[cairo] CAIRO_FORMAT_A1 image source color

Uli Schlachter psychon at znc.in
Tue Apr 1 11:55:46 PDT 2014

On 01.04.2014 19:32, sthustfo wrote:
> But still unable to identify where in png routines, the data is converted
> to monochrome? The data returned by cairo_image_surface_get_data() is all
> 0xff's. Any pointers would be appreciated.

If you really want monochrome, use CAIRO_FORMAT_RGB24.

If you want to interpret CAIRO_FORMAT_A1: The "1" means "one bit per pixel". So
a byte containing 0xff would mean 8 pixels with full alpha aka "opaque".

Who needs a ~/.signature anyway?

More information about the cairo mailing list