[cairo] [PATCH] Enable links to image files in SVG backend
alex.shulgin at gmail.com
Tue Jan 12 23:10:15 PST 2010
On Mon, Jan 4, 2010 at 09:42, Alexander Shulgin <alex.shulgin at gmail.com> wrote:
> On Fri, Jan 1, 2010 at 11:36, Adrian Johnson <ajohnson at redneon.com> wrote:
>> The cairo 1.9.4 development snapshot contains new API for embedding JPEG
>> data in backends that support it (currently SVG, PDF, PS, and
>> The cairo_surface_set_mime_data() function associates JPEG data (and other
>> formats) with a surface. When a surface with mime data is used as a source
>> in a backend that supports the mime data, the mime data will be embedded
>> instead of the image data.
> First, thanks for the hint. :)
> But using this API still makes cairo output image data inline into SVG
> file. Although reasonable, it's not what I want. I need it to put
> mere URI link to the originating file, like this:
> <image xlink:href="filename.jpg" width=... height=... />
> This way I can edit photo image in the JPEG file afterwards w/o the
> need to regenerate SVG file.
> From the SVG specs I follow this is pretty valid SVG tag, isn't it?
Hey, can anyone have another look at this request please?
Another reason to have uri's to image files in SVG is that it allows
to edit the SVG text by hand, which is cumbersome if some 1meg jpeg
images embedded into it instead.
More information about the cairo