You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by David VanderBrooke <VA...@war.wyeth.com> on 2001/06/28 16:16:16 UTC

Images

I've tried various experiments with the image tag and have not had much success.  I can't find much documentation on supported features so hopefully, someone can help.

Using batik 1.0

I would like to include the image in the svg via base64 encoding.  The examples work for png but any pngs I generate don't work.  I've taken the example base64 strings and placed them in my svg and it works.  I've used my Base 64 decoder to decode the examples and they make good png files.  My files do to work fine in the Adobe svg viewer.  

Are there certain kinds of pngs that work?

To base 64 encode I'm using the sun.misc encoder and encoding only the file contents.

I tried various forms of tiff files as well, mime type tiff.  None worked, either by base 64 or referenced.

Gif files work if I reference them.  I didn't try base 64 encoding and including them.

What should work now or where can I look for documentation?

Thanks in advance.


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


Images

Posted by Thomas E Deweese <th...@kodak.com>.
>>>>> "DV" == David VanderBrooke <VA...@war.wyeth.com> writes:

DV> I would like to include the image in the svg via base64 encoding.
DV> The examples work for png but any pngs I generate don't work.
DV> I've taken the example base64 strings and placed them in my svg
DV> and it works.  I've used my Base 64 decoder to decode the examples
DV> and they make good png files.

    In the process of writing tests for the Base64 codec I noticed and
then fixed a bug in the current Base64 decoder.  It is possible that
if you were very unlucky you may have been hit by this bug.  Thus I
suggest trying the latest CVS to see if the problem has gone away.

    If not my offer still stands to try and debug with one of your SVG
files.

DV> Are there certain kinds of pngs that work?

>>>>> "TD" == Thomas E Deweese <th...@kodak.com> writes:

TD>     It _should_ support any PNG, of course the proof is in the
TD> pudding.

DV> To base 64 encode I'm using the sun.misc encoder and encoding only
DV> the file contents.

DV> I tried various forms of tiff files as well, mime type tiff.  None
DV> worked, either by base 64 or referenced.

TD>     This is strange, I have a fairly large collection of tiff
TD> image variants and it reads the _vast_ majority of them.

DV> Gif files work if I reference them.  I didn't try base 64 encoding
DV> and including them.

TD>     Do the PNG images work when referenced?  If so I would guess
TD> there is something weird in your base64 encoding.

DV> What should work now or where can I look for documentation?

TD>     The source?
    
TD>     Probably your best bet is to send us a couple of small
TD> examples (original images, and base64 versions) and we can see if
TD> we can reproduce the problem or not.

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



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


Images

Posted by Thomas E Deweese <th...@kodak.com>.
>>>>> "DV" == David VanderBrooke <VA...@war.wyeth.com> writes:

DV> I've tried various experiments with the image tag and have not had
DV> much success.  I can't find much documentation on supported
DV> features so hopefully, someone can help.  Using batik 1.0

DV> I would like to include the image in the svg via base64 encoding.
DV> The examples work for png but any pngs I generate don't work.
DV> I've taken the example base64 strings and placed them in my svg
DV> and it works.  I've used my Base 64 decoder to decode the examples
DV> and they make good png files.  My files do to work fine in the
DV> Adobe svg viewer.

DV> Are there certain kinds of pngs that work?

    It _should_ support any PNG, of course the proof is in the pudding.

DV> To base 64 encode I'm using the sun.misc encoder and encoding only
DV> the file contents.

DV> I tried various forms of tiff files as well, mime type tiff.  None
DV> worked, either by base 64 or referenced.

    This is strange, I have a fairly large collection of tiff image
variants and it reads the _vast_ majority of them.

DV> Gif files work if I reference them.  I didn't try base 64 encoding
DV> and including them.

    Do the PNG images work when referenced?  If so I would guess there
is something weird in your base64 encoding.

DV> What should work now or where can I look for documentation?

    The source?
    
    Probably your best bet is to send us a couple of small examples
(original images, and base64 versions) and we can see if we can
reproduce the problem or not.

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


Re: Images

Posted by Bill Haneman <bi...@sun.com>.
David VanderBrooke wrote:
> 
> I've tried various experiments with the image tag and have not had much success.  I can't find much documentation on supported features so hopefully, someone can help.

I believe that Batik supports the <image> tag completely.  Your best
documentation for the <image> tag is the SVG working draft
specification.

> 
> Using batik 1.0
> 
> I would like to include the image in the svg via base64 encoding.  The examples work for png but any pngs I generate don't work.  I've taken the example base64 strings and placed them in my svg and it works.  I've used my Base 64 decoder to decode the examples and they make good png files.  My files do to work fine in the Adobe svg viewer.

One thing to look out for is that the beginning of the xlink:href
section with the base64-encoded data can't have a line break in it
(that is, the first line break should be the one *after* the first
line of encoded data).

I assume that you are familiar with the dataProtocol.svg example.  

> 
> Are there certain kinds of pngs that work?
> 
> To base 64 encode I'm using the sun.misc encoder and encoding only the file contents.
> 
> I tried various forms of tiff files as well, mime type tiff.  None worked, either by base 64 or referenced.

This suggests that something is amiss in your configuration, or that
for some reason you do not have the tiff decoder in your packages ?

> 
> Gif files work if I reference them.  I didn't try base 64 encoding and including them.
> 
> What should work now or where can I look for documentation?

The best place to look for this info is the batik "status" page:
http://xml.apache.org/batik/status.html
If you download the BE-test suite and compare the svg contents with
the status page you will see exactly which features are known to work
in Batik.  Batik's coverage of static SVG features is excellent at
this time, so if something fails to work then it is probably either a
bug or operator error :-)  Of course SVG files can have bugs as well,
and in some cases there may be files that are technically in error
which still display in other SVG viewers.

> Thanks in advance.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: batik-users-help@xml.apache.org

-- 
--------------
Bill Haneman
Gnome Accessibility / Batik SVG Toolkit
Sun Microsystems Ireland

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