trouble with existing PNG in CAIRO_FORMAT_A8

Tristen Ennemuist <[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <[email protected]>
hello!

i'm having a spot of trouble with grayscale png images.

i can load png images using cairo_image_surface_create_from_png, but subsequent calls to cairo_image_surface_get_format never return CAIRO_FORMAT_A8, even when the original png format is actually CAIRO_FORMAT_A8. it seems to always automatically convert to CAIRO_FORMAT_RGB24, leaving me no way of knowing the original file format - that is as far as i can tell...

i don't really mind this automatic conversion behaviour (as i can extract the data from the surface any way i like), but, if i'm not mistaken, what's causing me the real trouble is not being able to detect if the image was originally grayscale or rgb.

is there some way i can go about detecting the original png file format?


(i tried using gdk_pixbuf_new_from_file and found that also automatically converts.)


regards and thanks!

tristen

--
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.