[cairo] Generating 32-bit PNG files

Uli Schlachter psychon at znc.in
Thu Jun 30 15:53:14 UTC 2022


Hi,

Am 29.06.22 um 18:39 schrieb Rob Fearnside:
> 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?

Nope, there isn't.

Sorry.

Cheers,
Uli
-- 
"Do you know that books smell like nutmeg or some spice from a foreign
land?"
                                              -- Faber in Fahrenheit 451


More information about the cairo mailing list