On 13/12/2022 23:39, Thiessen, Paul (NIH/NLM/NCBI) [E] via Rdkit-discuss wrote:

Hi folks,

I’m trying to use the MolDraw2DCairo class to generate PNG images. But no matter what I’ve tried, including setting the ‘noFreetype’ param to true in the c’tor, I get an empty string from getDrawingText() and an exception with message “PNG header not recognized”. I traced this problem to the call to cairo_surface_write_to_png_stream() in MolDraw2DCairo.cpp, which gives an empty string and returns the cairo error/status “no memory.” Any ideas what’s causing this? I know nothing about cairo/freetype… I’m using cairo 1.16.

Are you linking the RDKit with other libraries? In my case, which gave weird png errors like yours, I was linking to other libraries that depended on a different version of libpng.


Paul.

_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to