[cairo] JPEG support patch
Andrew McRae
amcrae at employees.org
Tue Jan 16 21:57:01 PST 2007
On Tue, 2007-01-16 at 21:39 -0800, Vladimir Vukicevic wrote:
> Andrew McRae wrote:
> > Comments welcome on the addition of the JPEG
> > support functions to the API.
> >
> > Cheers,
> > AMc
> > PS to pre-empt the inevitable discussion on whether it is
> > wise to add yet more image formats to cairo, clearly
> > we need to support a small number of popular formats, and
> > in IMHO this list should perhaps be PNG, JPEG and perhaps GIF.
> > Someone suggested a separation of the image format I/O
> > into a separate library - this is probably a good idea..
>
> Pre-empting or not, I'm going to strongly disagree that support for more
> formats was needed. PNG was added as a way to ease testing; that's it.
> I'd be happy to see the PNG support become part of the testing
> boilerplate, instead of as part of the core library as well, but that
> might be harder to change now. Adding more of this type of "optional"
> functionality to cairo just dilutes the API.
Yes, in some ways it's unfortunate that PNG is already in there, and
isn't in a separate image loading library. Having one supported
format is perhaps one too many :-)
> There are already a pile of pretty good image loading libraries (DevIL
> comes to mind) that will happily load into a cairo_image_surface_t -- if
> you think there's a need for yet another image loading library that's
> specifically tied to cairo, I'd say go for it, but please keep it out of
> cairo proper.
OK, perhaps that's a better way to go - is it perhaps possible
to move PNG into that library? Or is it that the PNG
is now considered `locked' into the base cairo API?
One reason I ask is that I have some other changes
for paletting PNG, so these are more direct changes
to the existing cairo PNG code.
Cheers,
AMc
More information about the cairo
mailing list