Seemed that it was the Gif-format of the image that caused the problem,
since Jpeg works like it should.
But why doesn't it support Gif? It's a fairly standard format. Is it
because of the licensing-issue?
 
So, is there some simple solution to this other than converting the Gif
to a PNG as the image is loaded?
 
// Henric Rosvall

-----Original Message-----
From: Henric Rosvall [mailto:[EMAIL PROTECTED] 
Sent: den 25 januari 2007 11:18
To: [email protected]
Subject: Error when embedding an image


Hi !
 
I'm currently trying to get my software to insert images onto a
JSvgCanvas, but for some reason the code it generates works perfectly in
Adobe SVG Viewer, but not in JSvgCanvas. The JSvgCanvas only shows an
icon for a broken image.
Do any of you have any idea why this works in the Adobe viewer, but not
Batik? Is there some error that the Adobe viewer corrects, and if so,
where is the error?  The Base64-encoding should be correct, since I've
used compared the data generated by two separate Base64-algorithms, and
they match perfectly.
 
The SVG-code that is generated is this:
 
<svg contentScriptType="text/ecmascript" zoomAndPan="magnify"
xmlns:xlink="http://www.w3.org/1999/xlink"; contentStyleType="text/css"
id="m_svg" version="1.2" width="645.1905511811024"
preserveAspectRatio="xMinYMin slice" viewBox="0 0 645.1905511811024
891.6913385826772" height="891.6913385826772"
xmlns="http://www.w3.org/2000/svg"; x="0" y="0">
 
<image width="100px" xmlns:xlink="http://www.w3.org/1999/xlink";
xlink:href="data:;base64,R0lGODlhGQAZAMQAAK3H94Sq54yu58bb/zlhnJy+76XD77X
P997r/4yy55S6787j/9bn/7XT973X
99br/97v/0Sp97nh/wCtLQRDAFM1AbUAAP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACwA
AAAA
GQAZAAAFyiAkjmRpkkiqrmzrvrCLzXRt3+nzYFLv95GgcBjB6BgM3i8iIQqBRSQSw4Q6q76o
lMq8
Pq0YadJLDoYZiwW3uB5SKERMOs3FWCztyPs9lM+pdnd4ExN6e2+EE350ERYXd4+Jh4iEfgMD
GBOC
gpKTiRiXDg6ZkI4WiROHqBiiDQ2kpneoExUVsxiuBweZs721t7oAALy9qL+rwgYGxMXNisoF
BczO
vRjRCgo32tvYCd7f4OHi4ALl5ufo6ecB7O3u7/DuBPP09fb39SEAOw=="
id="image_object_5104638" height="100px" />
 
</svg>
 
I've also attached the SVG-file in this mail.
 
If everything works, you should se a little image of a house and a tree.
 
Regards
Henric Rosvall

Reply via email to