[cairo] Cairo + GdkPixbuf
spitzak at gmail.com
Sun Jun 27 09:21:01 PDT 2010
On 06/27/2010 02:07 AM, Benjamin Otte wrote:
>> As far as I can tell there are only *two* 4-byte image formats of any
>> interest: "ARGB32" and "RGBA".
> As long as you ignore the less-common braindead formats like GdkPixbuf's
> non-alpha format (24bit RGB) or people that actually knew that
> premultiplied or ARGB is the way to go and used premultiplied RGBA or
> unpremultiplied ARGB...
> Of course, you can still say "not supported" and force them to do manual
> labor for their backwards compatibility, but it's kinda trivial for
> Cairo to implement it.
I meant two 4-byte layouts. There is also RGB layout of bytes that is
Along with these 4-byte layouts there appears to be 3 interpretations of
the alpha: ignore it, unpremultiplied, and premultiplied. If we only had
to worry about sources these could just be new compositing operators.
For destinations this does complicate things.
If people really want destination images in arbitrary formats I think it
will have to be done by making an operator on image surfaces that is
"give me a copy of this image surface in this format". This one could
not be written to but could be used as a source. This would avoid the
More information about the cairo