[cairo] Generating 32-bit PNG files

Rob Fearnside shredzone at hotmail.com
Wed Jun 29 16:39:26 UTC 2022


I'm using cairo_surface_write_to_png() to generate PNG image sequences from 32-bit source surfaces (ie. CAIRO_FORMAT_ARGB32).  I need the resultant files to all have the same format (32-bit with an alpha channel), but cairo generates 24-bit PNG files for any source images that happen to be entirely opaque (and 32-bit files for those with transparency).

Is there a way of forcibly generating 32-bit PNGs? (and thus also avoid the performance overhead of _cairo_mage_analyze_transparency() )

Thanks in advance

Rob
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cairographics.org/archives/cairo/attachments/20220629/ca687632/attachment.htm>


More information about the cairo mailing list