xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Archie Cobbs" <arc...@awarix.com>
Subject Re: Adding JPG to SVG Document
Date Mon, 16 Apr 2007 14:23:44 GMT
On 4/16/07, Brian Corrigan <brian.corrigan@ammeon.com> wrote:
> I'm looking to add a JPG image to an SVG document but want to do it with
> out manually adding an xml element. Was looking at the ImageNode and
> think its what I'm looking for but I have know idea how I would go about
> using it properly. The only examples I can find are of exporting an SVG
> Doc to a jpg/png/etc.

Here's an example of the general idea...

  <image transform="translate(-25, -25)" width="50" height="50"
      xmlns:xlink="http://www.w3.org/1999/xlink"
      xlink:href="http://www.example.com/foobar.jpg"
      preserveAspectRatio="xMidYMid meet"/>

I usually center the imported image with a translation as shown.

-Archie

__________________________________________________________________________
Archie Cobbs      *        CTO, Awarix        *      http://www.awarix.com

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org


Mime
View raw message