[cairo] Other image formats than CAIRO_FORMAT_ARGB32

Carl Worth cworth at cworth.org
Wed Jan 28 23:22:56 PST 2009


On Wed, 2009-01-28 at 17:02 -0800, Stefan Landvogt wrote:

> I was wondering whether there are any plans to support additional
> image formats to CAIRO_FORMAT_ARGB32 and the other 3 formats.

> At the moment I am rendering to an image buffer, but before blitting
> it into my graphic system I have to swap R and B, so I would be
> interested in a CAIRO_FORMAT_ABGR32.
> Of course I could use  colors that have red and blue swapped, but I
> actually try to have the same drawing in screen as on export to PNG.

Hi Stefan,

So far we've avoided going down the road of limitless numbes of image
formats. This has been for two primary reasons (at least that I can
think of off the top of my head):

1. Avoiding combinatorial explosions (to the extent that we can) that
require mountains of code in the implementation.

2. Avoid offering many operations, only some of which will be
implemented efficiently, (and with no indication to the user which are
which).

Now, there has been a lot of recent talk (and work) about bringing JIT
techniques to pixman (which is the implementation for cairo's
image-surface rendering). If that stuff comes along in the future, it
may well render both of the above objections moot. So at that point, we
might be able to add a very comprehensive set of image formats.

I hope that answer helps explain things at least, (even if it doesn't
immediately provide you with the interface you want).

Have fun with cairo!

-Carl


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.cairographics.org/archives/cairo/attachments/20090128/c4a62a3a/attachment.pgp 


More information about the cairo mailing list