Re: JPEG Support For Libcairo
Bernhard Fischer <[email protected]>
| Newsgroups | gmane.comp.lib.cairo |
|---|---|
| Message-ID | <2418166.3kU2BdiKF0@winnie> |
On Tuesday 29 December 2015 09:57:25 Adrian Johnson wrote: > On 29/12/15 00:42, Bernhard Fischer wrote: > > I implemented two small functions which read/write JPEG into/from a Cairo > > image surface. > > > > Please find more info here: > > https://www.cypherpunk.at/2015/12/jpeg-support-for-libcairo/ > > > > > > Best regards, > > Bernhard > > If you are going to use this code with any of the PDF/PS/SVG/Win32Print > backends it is a good idea to set the JPEG mime data for the image > surface. That way JPEG files will be embedded directly in the output > instead of the backend compressing the image data with lossless > compression. See attached patch. I updated the code but modified it in order to avoid the duplicate data loading (which occurs in your patch) and I added error checking to malloc(). Latest code here: https://www.cypherpunk.at/download/eagle/cairo_jpg.c Regards, Bernhard -- cairo mailing list [email protected] http://lists.cairographics.org/mailman/listinfo/cairo