Re: CAIRO_FORMAT_A1 image source color

Uli Schlachter <[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <[email protected]>
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".

Uli
-- 
Who needs a ~/.signature anyway?
-- 
cairo mailing list
[email protected]
http://lists.cairographics.org/mailman/listinfo/cairo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.