Thanks yeah I suspect it’s some internal mismatch of libz/libpng versions. Because a “pure RDKit” app (like Mol2Draw/moldraw2DTestCatch) seems to work ok, but when I link it into my application (that brings in a gazillion other libraries) it doesn’t, although it compiles/links fine and at runtime I don’t see any other error messages. Oh well, not a huge deal, I can just use SVG instead.
- Paul -- Dr. Paul A. Thiessen NCBI / NLM / NIH thies...@ncbi.nlm.nih.gov<mailto:thies...@ncbi.nlm.nih.gov> From: Paul Emsley <pems...@mrc-lmb.cam.ac.uk> Sent: Wednesday, December 14, 2022 9:20 AM To: rdkit-discuss@lists.sourceforge.net Subject: [EXTERNAL] Re: [Rdkit-discuss] cairo/png problem 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. CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and are confident the content is safe.
_______________________________________________ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss