[cairo] Cairo + GdkPixbuf

Ian Britten britten at caris.com
Wed Jun 30 11:50:44 PDT 2010

On 26/06/10 07:22 AM, Benjamin Otte wrote:
>> The fact that Cairo cannot understand non-premultiplied RGBA which is
>> used in GdkPixbuf is somewhat inconvenient.
> Yes, RGBA is the obvious choice of people new to image formats, because
> it's how people think of pixels. Which is why it shows up in every
> project that needs graphics but has inexperienced developers (like Gtk1,
> HTML5 canvas or the PNG specification).

Can you explain how experience moves one to favour premultiplied
When starting to integrate Cairo into our stuff, I found myself
having to write shim code to convert various pixel representations
to Cairo's format and back again, and have often wondered about
the reason/benefit.

eg: One thing I hate is how if you have a real RGB value and drop
the Alpha to zero and premultiply it, then you can never get the
original RGB value back.  You only ever get black back ...  :P

Many thanks for any info, pointers, etc!

More information about the cairo mailing list