You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by "Adam R. B. Jack" <aj...@trysybase.com> on 2004/04/03 00:11:44 UTC
SVG to PNG
I am trying to get Forrest to generate PNGs for SVG, and I can't seem to
figure it out. Note: I am not trying to do logos and such, but more inlined
graphics (charts, etc.) As such I was hoping something like this might work
in an xdoc:
<img src="test.png" alt="test"/> with test.svg or test.png in the same
directory.
I've tried this, but with the .svg or .xml in the images directory. I've
tried using .svg as the extension. Nothing gives me what I'd hope for.
I've tried the Google search (for xml.apache.org) and I don't find anything
that answers it.
I find this: http://xml.apache.org/forrest/
a.. SVG to PNG rendering (using Apache Batik); simply drop a SVG in the
appropriate directory and it will be rendered as PNG.
and: http://xml.apache.org/forrest/your-project.html
Generate PNG or JPEG images from SVG XML files. (Update: Forrest's sitemap
now does this natively).
Can anybody tell me if what I am trying is supported, and if so, how.
Thanks in advance.
regards
Adam
--
Experience the Unwired Enterprise:
http://www.sybase.com/unwiredenterprise
Try Sybase: http://www.try.sybase.com
Re: SVG to PNG
Posted by Nicola Ken Barozzi <ni...@apache.org>.
Adam R. B. Jack wrote:
> I am trying to get Forrest to generate PNGs for SVG, and I can't seem to
> figure it out. Note: I am not trying to do logos and such, but more inlined
> graphics (charts, etc.) As such I was hoping something like this might work
> in an xdoc:
>
> <img src="test.png" alt="test"/> with test.svg or test.png in the same
> directory.
It _should_ work. I guess we have a bug here.
> I've tried this, but with the .svg or .xml in the images directory. I've
> tried using .svg as the extension. Nothing gives me what I'd hope for.
I have the feeling that probably ATM it works if you put the svgs in an
/images dir, IOW:
/page.xml
/images/test.svg
<img src="images/test.png" alt="test"/>
I'm checking now.
--
Nicola Ken Barozzi nicolaken@apache.org
- verba volant, scripta manent -
(discussions get forgotten, just code remains)
---------------------------------------------------------------------
Re: SVG to PNG
Posted by Juan Jose Pablos <ch...@che-che.com>.
Nicola Ken Barozzi escribió:
>
> Please update from SVG, and rebuild and try it.
>
I guess that you wanted to say SVN :-)
Re: SVG to PNG
Posted by "Adam R. B. Jack" <aj...@trysybase.com>.
> Maybe I haven't tried as advertised. What is the right way? Maybe I tride
> the wrong permutations.
[...]
> Ok, so I have the svg as a .svg, but I reference and a .png. Ok, I can try
> that.
>
> But do I have <img src="mysvg.png" alt="whatever" /> ?
Either I used the wrong choices of extension combinations, or the .svg I had
was corrupted (and maybe not understandable as an SVG.) When I test it with
one I know is a valid SVG, and with this combination, it worked fine,
thanks!
regards
Adam
Re: SVG to PNG
Posted by "Adam R. B. Jack" <aj...@trysybase.com>.
> I have just tried it and it works as advertised. I even tried to create
> a new SVG with an editor and it shows the PNG.
Maybe I haven't tried as advertised. What is the right way? Maybe I tride
the wrong permutations.
> Please update from SVG, and rebuild and try it.
>
> src/documentation/content/xdocs/mysvg.svg
>
> then try calling, after a 'forrest run':
>
> http://localhost:8888/mysvg.png
>
Ok, so I have the svg as a .svg, but I reference and a .png. Ok, I can try
that.
But do I have <img src="mysvg.png" alt="whatever" /> ?
regards
Adam
Re: SVG to PNG
Posted by Nicola Ken Barozzi <ni...@apache.org>.
Adam R. B. Jack wrote:
> I am trying to get Forrest to generate PNGs for SVG, and I can't seem to
> figure it out. Note: I am not trying to do logos and such, but more inlined
> graphics (charts, etc.) As such I was hoping something like this might work
> in an xdoc:
>
> <img src="test.png" alt="test"/> with test.svg or test.png in the same
> directory.
>
> I've tried this, but with the .svg or .xml in the images directory. I've
> tried using .svg as the extension. Nothing gives me what I'd hope for.
I have just tried it and it works as advertised. I even tried to create
a new SVG with an editor and it shows the PNG.
Please update from SVG, and rebuild and try it.
src/documentation/content/xdocs/mysvg.svg
then try calling, after a 'forrest run':
http://localhost:8888/mysvg.png
it should show.
--
Nicola Ken Barozzi nicolaken@apache.org
- verba volant, scripta manent -
(discussions get forgotten, just code remains)
---------------------------------------------------------------------