[cairo] Embedding jpeg in pdf

Jan Struyf jan.struyf at cs.kuleuven.be
Tue Jul 15 08:31:04 PDT 2008


>> On Jul 14, 2008, at 1:25 PM, Bill Spitzak wrote:
>> There would be a new type of surface, replacing the png one, and 
>> designed to hold an *arbitrary* file or stream of data. By default 
>> Cairo would only understand .png files (and probably a compilation 
>> switch to make it understand *no* files), and some source code would be 
>> provided to show how to add libjpeg as a new interpreter. This surface 
>> would keep track of the stream data and also a pointer to an 
>> interpreter object that decodes it into pixels.
>
> On Mon, 14 Jul 2008, Vladimir Vukicevic wrote:
> Why?  The interesting piece of functionality is being able to embed jpeg 
> data into cairo's PDF and PS output.  Everything else, I think, is 
> unnecessary. We just need to attach a chunk of data that cairo has a 
> little bit of knowledge about to a surface ("This is JPEG data; it is 
> not a progressive jpeg"), and have a few places in the code that can 
> check for that data.

A more general approach would be useful, as Jeremy Lea also pointed out, 
because it can be used to import EPS figures in PS output or PDF figures 
in PDF output without the need for a PS/PDF interpretter.

Best,

Jan Struyf.


More information about the cairo mailing list