Hi Thomas,
I already had the images as jpeg, publicly accessible. Thanks to your suggestion, I implemented a new ImageHandler which ignores the images. A public method setCurrentURL(url) is called BEFORE the g2.draw(), and the custom image handler writes the height, witdth etc and adds the previously set URL as the xref link.
thanks again for pointing me in the right direction!
keep smiling
Brigette
-----Original Message-----
From: Thomas E Deweese [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 16, 2001 12:43 PM
To: Batik Users
Subject: Using URL rather than embedded PNG from SVGGraphics2D
>>>>> "BM" == Brigette Muller <[EMAIL PROTECTED]> writes:
BM> Hi all,
BM> Does anyone have an example of some code to create an SVG
BM> document with an image referenced by a URL, rather than an
BM> embedded png?
[...]
BM> What I would like to do is on writing the image to the SVG,
BM> include the URL as above, not the embedded png. Any suggestions
BM> where to look? tia Brigette
You want to replace the default ImageHandlerBase64Encoder with
either ImageHandlerPNGEncoder or ImageHandlerJPEGEncoder. This can be
done most simply in the constructor for SVGGraphics2D:
public SVGGraphics2D(Document domFactory,
ImageHandler imageHandler,
ExtensionHandler extensionHandler,
boolean textAsShapes)
The interface and construction of the ImageHandlers is fairly
straight forward.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
