Import images are not supported

User 4616a6b00d

09-03-2016 05:13:42

Hi There,


We are using Marvin JS without Jchem Webservices . The problem is that we are not able to import the images to the editor .Only file format with .mol extension is supported now. Please let me know if JChem Webservices has a dependency on importing images with file formats like .png and .jpeg.

ChemAxon 76c88f5366

09-03-2016 13:01:52

Hi Mohith, 


Currently,  Marvin JS has no option for image import. This is an item in our TODO list, but we are working on other features now, so we cannot promise a deadline for this.


As a workaround, it is possible to convert your images with another software to a molecule source, then import it to Marvin JS, which can handle this file.


In forum there is an example, how to combine JChem Web Services with OSRA (this is a free software).
For details, please check this forum post:
https://www.chemaxon.com/forum/viewpost63887.html#63887


If you need more information, let us know.


Best regards, 
Eszter 

User 4616a6b00d

10-03-2016 03:29:17

Thanks Ezster for the reply . In one of the examples which you have defined at https://marvinjs-demo.chemaxon.com/latest/examples/example-create-image.html we have createImage function that creates a new instance of Image Exporter class and calls its render function to convert given string into image  .I was earlier calling the "image/jpeg"with applydatauri which was working fine .But recently as there was a requirement for us to get the string converted to svg format i used the same creatImage function as suggested by in those examples for svg which uses applysvg .But the problem is that the image converted to svg format isn't displaying. When i debug the following line ("#imageContainer").html(svg);I will get the svg content but the image isn't displayed. I am using Chrome browser in my application .I have attached the code snippet along with this description.Please let me know for detail description .

ChemAxon 7c2d26e5cf

11-03-2016 12:38:16

Creating and embedding SVG into HTML source works fine for us in our official example:


https://marvinjs-demo.chemaxon.com/latest/examples/example-create-image.html


Can you reproduce the issue with the above example?


If you share the generated SVG source we can get close to the issue.