JPG image format

User 818520b6b8

26-04-2005 13:40:05

Hi all,





I have a problem when saving molecules from our application.





I add an attachment showing the differences between what our application saves and what Marvin Sketch with default properties saves, for the same structure.





In the zip file you can see three images:


- database_image.jpg: molecule loaded into our custom application from database. It has a red circle around the problem.


- saved_api_image.jpg: the jpg resulting from saving the image from our custom application


- saved_sketch_image.jpg:image saved from sketch with default options. This is the expected result we'd like to obtain.





The parameters for marvin view are the following:





Code:
String layout = "layout0=:2:1:M:1:0:1:1:c:b:1:1:L:0:0:1:1:c:n:0:1\n" + "param0=:M:300:250:L:12b\n";





        viewer.setParams(


              "#\n"+


              "# MarvinView properties\n"+


              "#\n"+


              "rows=1\n"+


              "cols=1\n"+


              "visibleRows=1\n"+


               layout +


              "\n"+


              "#\n"+


              "# MarvinSketch properties also have to be specified here for the sketcher\n"+


              "# windows that are launched from the viewer (using Edit/Structure).\n"+


              "#\n"+


              "extrabonds=arom,wedge\n");





The parameters for image saving are the following:





String format = "jpeg:scale18,-a,H_off,mono,atsiz0.6";








Where is the problem?





Please help !!!!

ChemAxon 7c2d26e5cf

27-04-2005 13:19:30

If I understand you well, your problem is that the atom labels hide bonds when you export structure into image format by using Molecule.toBinFormat(...).


You can solve this problem by setting the size of the atom labels to smaller.





Code:
mol.toBinFormat("jpeg:scale18,-a,H_off,mono,atsiz0.5")






Is it a suitable solution for you?

User 818520b6b8

27-04-2005 13:28:52

Yes that is the problem, but not the solution for us.





I tried with atsiz, but the problem then is that structures with K+, or Na+ show K- or Na- instead, because of the image precision.





Is there any other way?

ChemAxon 7c2d26e5cf

27-04-2005 14:28:46

Can you show me the original mol file to check the issue?





Since the last release, we have improved the drawing of "+" signs. Marvin 4.0 will include this feature. A test version of the new Marvin is already available.


http://www.chemaxon.hu/shared/alpha

User 818520b6b8

27-04-2005 14:39:49

I attach an image and a SDFile for a conflictive structure.