[cairo] cairocffi and GDK-PixBuf for decoding JPEG and other image formats

Simon Sapin simon.sapin at exyr.org
Sat Mar 2 13:52:08 PST 2013

Le 02/03/2013 20:00, Bill Spitzak a écrit :
> It is written for game development which may be a reason it is being
> ignored here, but ImageMagic (sp?) does the job. It reads lots of image
> formats, produces ARGB32, and*only*  does images (ie you are not getting
> glib or gtk). It reads hundreds of image formats using a .so system.
> I think there are about a dozen others as well.
> Should probably look into them.

Yes, ImageMagick does the job, as do many other libraries. I’m using 
this in WeasyPrint, where I also use Pango and thus depend on glib 
anyway, so GDK-PixBuf makes sense.

CFFI also allows doing this in Python without compiling custom C code 
(which helps for portability.)

That said, I would be glad to see code examples for doing the same with 
ImageMagick or other libraries.

Simon Sapin

More information about the cairo mailing list