Difference in image generation between Java6 and Java8

User 275943b04a

21-11-2014 17:26:06

Hi,


we need to move all our Java infrastructure (Server side and client side) to Java8.  I have noticed that images with transparent backgrounds turn out better with JDK6 rather than JDK8 (see attached).  Is there any way to get Java8 generating the same image as Java6?  Below is the code snippet for the image generation.  I've used JChem 5.9.1 in this instance (although I've tried several other JChem versions and they seem to do the same thing).


 


Thanks muchly (apologies if this has come up before, I've seen similar threads but not exactly this problem)


D




Molecule importMol = MolImporter.importMol("CN1C=NC2=C1C(=O)N(C(=O)N2C)C");


byte[] image = MolExporter.exportToBinFormat(importMol, "png:transbg");


// File file = new File("testTransparent_jdk1.6.0_26.png");


File file = new File("testTransparent_jdk1.8.0_20.png");


FileOutputStream fileOutputStream = new FileOutputStream(file);


fileOutputStream.write(image);

ChemAxon 2c555f5717

24-11-2014 11:29:08

Dear Gazelle!


   I think this issue is covered since Marvin 14.09.23 (relase notes). Could you check with the most relevant release that you can get wether if it is still an issue?


Regards:
Balázs 

User 275943b04a

24-11-2014 17:13:25

Hi Balázs,


That has done the trick, thank you very much.  I used v 14.11.17.0.  I guess it stands to reason that for us to use the latest JDK we need to be using the latest JChem.


 


All the best


Derek


 



ChemAxon 2c555f5717

25-11-2014 09:54:59

Dear Derek,


   I am glad that it helped to solve your problem. I must highlight that this was only done for transparent pngs. If you know about any other difficulties or problems with other formats, please inform us immediately.


Regards:
Balázs