Saving Deep Images As PNG?
Lawrence D'Oliveiro <[email protected]>
| Newsgroups | gmane.comp.lib.cairo |
|---|---|
| Organization | Geek Central |
| Message-ID | <[email protected]> |
Looking at src/cairo-png.c, if the ImageSurface format is CAIRO_FORMAT_RGB30, then it sets bpc (bits per component) to 10. This value is then passed as the bit_depth argument to png_set_IHDR. However, according to the libpng docs <http://libpng.org/pub/png/libpng-manual.txt>, valid values for this argument are 1, 2, 4, 8 or 16, depending on the color_type. I think the value of 10 is being silently truncated or rounded to 8, so the result PNG file only ends up with 8 bits per component. Certainly I cannot see any signs of component depths greater than 8 when I try examining the file with “identify --verbose”. -- cairo mailing list [email protected] http://lists.cairographics.org/mailman/listinfo/cairo