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 compie <jo...@gmail.com> on 2007/03/01 09:41:26 UTC
use Batik rasterizer to get same result as in Squiggle
I would like to use the Batik-rasterizer to get the same result as I see on
the screen with Squiggle.
Here is my SVG file:
http://www.johanc.nl/dump/image_magick.xml.svg
http://www.johanc.nl/dump/image_magick.xml.svg
Viewed in Squiggle:
http://www.johanc.nl/dump/squiggle.png
Result from rasterizer:
http://www.johanc.nl/dump/rasterizer.png
I have been trying to use the -w, -h, -maxw, -maxh, -a and -dpi options to
get the same result as in Squiggle, but the result only gets worser.
Can someone point out the options I need to get my SVG file correctly
rasterized?
P.S. The SVG file is well-formed and valid and it displays correctly in
Firefox 2, IE7 (with Adobe SVG viewer plugin).
See:
http://www.johanc.nl/dump/firefox.png
http://www.johanc.nl/dump/ie.png
--
View this message in context: http://www.nabble.com/use-Batik-rasterizer-to-get-same-result-as-in-Squiggle-tf3325677.html#a9245749
Sent from the Batik - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
Re: use Batik rasterizer to get same result as in Squiggle
Posted by Andreas Neumann <ne...@karto.baug.ethz.ch>.
compie wrote:
>But there has to be a way to make it work, because Squiggle can handle the
>percentages used for the width.
>
>
I agree.
Either we did not find how to do this, or its a bug/something missing in
batik-rasterizer.
Someone else knows how to do this correctly? If one explicitely sets the
width/height using -w and -h options shouldn't the percentages work in
the rasterizer?
>Does Squiggle use the batik rasterizer or the transcoding API?
>
>http://xmlgraphics.apache.org/batik/using/transcoder.html
>
>Johan.
>
>
>
>
>
--
----------------------------------------------
Andreas Neumann
Institute of Cartography
ETH Zurich
Wolfgang-Paulistrasse 15
CH-8093 Zurich, Switzerland
Phone: ++41-44-633 3031, Fax: ++41-44-633 1153
e-mail: neumann@karto.baug.ethz.ch
www: http://www.carto.net/neumann/
SVG.Open: http://www.svgopen.org/
Carto.net: http://www.carto.net/
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
Re: use Batik rasterizer to get same result as in Squiggle
Posted by compie <jo...@gmail.com>.
Hi Thomas,
Thanks for your help!
I will try the new version.
Johan.
thomas.deweese wrote:
>
> Hi Compie,
>
> I've just committed a patch that fixes this.
>
> compie <jo...@gmail.com> wrote on 03/02/2007 03:15:19 AM:
>
>> But there has to be a way to make it work, because Squiggle can handle
> the
>> percentages used for the width.
>> Does Squiggle use the batik rasterizer or the transcoding API?
>
> Squiggle doesn't use the transcoder API to render to the
> screen (it would be too inefficient for dynamic documents).
> The basic problem is that the rasterizer didn't set it's
> User Agent Width/Height before evaluating the SVG document
> (when the percentages are evaluated).
>
> A bit part of the reason is that we don't want w/h to
> act just like the U/A W/H in SVG since we often want to
> 'scale' the image up to match those given. However I
> think that my change only improves things since it makes
> the 'desired' size available when evaluating the root
> SVG element, but we continue to resize the document if it
> doesn't conform.
>
>> http://xmlgraphics.apache.org/batik/using/transcoder.html
>>
>> Johan.
>>
>>
>>
>> Andreas Neumann wrote:
>> >
>> > Hello Johan,
>> >
>> > hm, I couldn't get it to work either. The only way I found out which
>> > works, was to exchange the
>> > width="100%" with some pixel value, like width="1200".
>> >
>> > Then I used the following command:
>> >
>> > ./build.sh svgrasterizer -d image_magick.pdf -m application/pdf
>> > image_magick.xml.svg
>> >
>> > It is an elegant mix of percentages and fixed values that you use. I
>> > like it!
>> >
>> > Andreas
>> >
>> >
>> >
>> > compie wrote:
>> >
>> >>I would like to use the Batik-rasterizer to get the same result as I
> see
>> on
>> >>the screen with Squiggle.
>> >>
>> >>Here is my SVG file:
>> >>http://www.johanc.nl/dump/image_magick.xml.svg
>> >>http://www.johanc.nl/dump/image_magick.xml.svg
>> >>
>> >>Viewed in Squiggle:
>> >>http://www.johanc.nl/dump/squiggle.png
>> >>
>> >>Result from rasterizer:
>> >>http://www.johanc.nl/dump/rasterizer.png
>> >>
>> >>I have been trying to use the -w, -h, -maxw, -maxh, -a and -dpi
> options to
>> >>get the same result as in Squiggle, but the result only gets worser.
>> >>Can someone point out the options I need to get my SVG file correctly
>> >>rasterized?
>> >>
>> >>P.S. The SVG file is well-formed and valid and it displays correctly
> in
>> >>Firefox 2, IE7 (with Adobe SVG viewer plugin).
>> >>See:
>> >>http://www.johanc.nl/dump/firefox.png
>> >>http://www.johanc.nl/dump/ie.png
>> >>
>> >>
>> >>
>> >
>> >
>> > --
>> > ----------------------------------------------
>> > Andreas Neumann
>> > Institute of Cartography
>> > ETH Zurich
>> > Wolfgang-Paulistrasse 15
>> > CH-8093 Zurich, Switzerland
>> >
>> > Phone: ++41-44-633 3031, Fax: ++41-44-633 1153
>> > e-mail: neumann@karto.baug.ethz.ch
>> > www: http://www.carto.net/neumann/
>> > SVG.Open: http://www.svgopen.org/
>> > Carto.net: http://www.carto.net/
>> >
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
>> > For additional commands, e-mail:
> batik-users-help@xmlgraphics.apache.org
>> >
>> >
>> >
>>
>> --
>> View this message in context: http://www.nabble.com/use-Batik-
>> rasterizer-to-get-same-result-as-in-Squiggle-tf3325677.html#a9265741
>> Sent from the Batik - Users mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
>> For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
>
>
>
--
View this message in context: http://www.nabble.com/use-Batik-rasterizer-to-get-same-result-as-in-Squiggle-tf3325677.html#a9270922
Sent from the Batik - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
Re: use Batik rasterizer to get same result as in Squiggle
Posted by Andreas Neumann <ne...@karto.baug.ethz.ch>.
Hi Thomas and Johan,
I just tried the new SVN version. It seems to work perfect. I used this
command:
./build.sh svgrasterizer -d image_magick.pdf -m application/pdf -w 1200
http://www.johanc.nl/dump/image_magick.xml.svg
So, Johan if you grap the SVN version or a nightly build your problem is
solved.
Thank you Thomas for your very quick fix. I really appreciate your
responsiveness!
Andreas
thomas.deweese@kodak.com wrote:
>Hi Compie,
>
> I've just committed a patch that fixes this.
>
>compie <jo...@gmail.com> wrote on 03/02/2007 03:15:19 AM:
>
>
>
>>But there has to be a way to make it work, because Squiggle can handle
>>
>>
>the
>
>
>>percentages used for the width.
>>Does Squiggle use the batik rasterizer or the transcoding API?
>>
>>
>
> Squiggle doesn't use the transcoder API to render to the
>screen (it would be too inefficient for dynamic documents).
>The basic problem is that the rasterizer didn't set it's
>User Agent Width/Height before evaluating the SVG document
>(when the percentages are evaluated).
>
> A bit part of the reason is that we don't want w/h to
>act just like the U/A W/H in SVG since we often want to
>'scale' the image up to match those given. However I
>think that my change only improves things since it makes
>the 'desired' size available when evaluating the root
>SVG element, but we continue to resize the document if it
>doesn't conform.
>
>
>
yes, this makes sense.
Andreas
--
----------------------------------------------
Andreas Neumann
Institute of Cartography
ETH Zurich
Wolfgang-Paulistrasse 15
CH-8093 Zurich, Switzerland
Phone: ++41-44-633 3031, Fax: ++41-44-633 1153
e-mail: neumann@karto.baug.ethz.ch
www: http://www.carto.net/neumann/
SVG.Open: http://www.svgopen.org/
Carto.net: http://www.carto.net/
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
Re: use Batik rasterizer to get same result as in Squiggle
Posted by th...@kodak.com.
Hi Compie,
I've just committed a patch that fixes this.
compie <jo...@gmail.com> wrote on 03/02/2007 03:15:19 AM:
> But there has to be a way to make it work, because Squiggle can handle
the
> percentages used for the width.
> Does Squiggle use the batik rasterizer or the transcoding API?
Squiggle doesn't use the transcoder API to render to the
screen (it would be too inefficient for dynamic documents).
The basic problem is that the rasterizer didn't set it's
User Agent Width/Height before evaluating the SVG document
(when the percentages are evaluated).
A bit part of the reason is that we don't want w/h to
act just like the U/A W/H in SVG since we often want to
'scale' the image up to match those given. However I
think that my change only improves things since it makes
the 'desired' size available when evaluating the root
SVG element, but we continue to resize the document if it
doesn't conform.
> http://xmlgraphics.apache.org/batik/using/transcoder.html
>
> Johan.
>
>
>
> Andreas Neumann wrote:
> >
> > Hello Johan,
> >
> > hm, I couldn't get it to work either. The only way I found out which
> > works, was to exchange the
> > width="100%" with some pixel value, like width="1200".
> >
> > Then I used the following command:
> >
> > ./build.sh svgrasterizer -d image_magick.pdf -m application/pdf
> > image_magick.xml.svg
> >
> > It is an elegant mix of percentages and fixed values that you use. I
> > like it!
> >
> > Andreas
> >
> >
> >
> > compie wrote:
> >
> >>I would like to use the Batik-rasterizer to get the same result as I
see
> on
> >>the screen with Squiggle.
> >>
> >>Here is my SVG file:
> >>http://www.johanc.nl/dump/image_magick.xml.svg
> >>http://www.johanc.nl/dump/image_magick.xml.svg
> >>
> >>Viewed in Squiggle:
> >>http://www.johanc.nl/dump/squiggle.png
> >>
> >>Result from rasterizer:
> >>http://www.johanc.nl/dump/rasterizer.png
> >>
> >>I have been trying to use the -w, -h, -maxw, -maxh, -a and -dpi
options to
> >>get the same result as in Squiggle, but the result only gets worser.
> >>Can someone point out the options I need to get my SVG file correctly
> >>rasterized?
> >>
> >>P.S. The SVG file is well-formed and valid and it displays correctly
in
> >>Firefox 2, IE7 (with Adobe SVG viewer plugin).
> >>See:
> >>http://www.johanc.nl/dump/firefox.png
> >>http://www.johanc.nl/dump/ie.png
> >>
> >>
> >>
> >
> >
> > --
> > ----------------------------------------------
> > Andreas Neumann
> > Institute of Cartography
> > ETH Zurich
> > Wolfgang-Paulistrasse 15
> > CH-8093 Zurich, Switzerland
> >
> > Phone: ++41-44-633 3031, Fax: ++41-44-633 1153
> > e-mail: neumann@karto.baug.ethz.ch
> > www: http://www.carto.net/neumann/
> > SVG.Open: http://www.svgopen.org/
> > Carto.net: http://www.carto.net/
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
> > For additional commands, e-mail:
batik-users-help@xmlgraphics.apache.org
> >
> >
> >
>
> --
> View this message in context: http://www.nabble.com/use-Batik-
> rasterizer-to-get-same-result-as-in-Squiggle-tf3325677.html#a9265741
> Sent from the Batik - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
Re: use Batik rasterizer to get same result as in Squiggle
Posted by compie <jo...@gmail.com>.
But there has to be a way to make it work, because Squiggle can handle the
percentages used for the width.
Does Squiggle use the batik rasterizer or the transcoding API?
http://xmlgraphics.apache.org/batik/using/transcoder.html
Johan.
Andreas Neumann wrote:
>
> Hello Johan,
>
> hm, I couldn't get it to work either. The only way I found out which
> works, was to exchange the
> width="100%" with some pixel value, like width="1200".
>
> Then I used the following command:
>
> ./build.sh svgrasterizer -d image_magick.pdf -m application/pdf
> image_magick.xml.svg
>
> It is an elegant mix of percentages and fixed values that you use. I
> like it!
>
> Andreas
>
>
>
> compie wrote:
>
>>I would like to use the Batik-rasterizer to get the same result as I see
on
>>the screen with Squiggle.
>>
>>Here is my SVG file:
>>http://www.johanc.nl/dump/image_magick.xml.svg
>>http://www.johanc.nl/dump/image_magick.xml.svg
>>
>>Viewed in Squiggle:
>>http://www.johanc.nl/dump/squiggle.png
>>
>>Result from rasterizer:
>>http://www.johanc.nl/dump/rasterizer.png
>>
>>I have been trying to use the -w, -h, -maxw, -maxh, -a and -dpi options to
>>get the same result as in Squiggle, but the result only gets worser.
>>Can someone point out the options I need to get my SVG file correctly
>>rasterized?
>>
>>P.S. The SVG file is well-formed and valid and it displays correctly in
>>Firefox 2, IE7 (with Adobe SVG viewer plugin).
>>See:
>>http://www.johanc.nl/dump/firefox.png
>>http://www.johanc.nl/dump/ie.png
>>
>>
>>
>
>
> --
> ----------------------------------------------
> Andreas Neumann
> Institute of Cartography
> ETH Zurich
> Wolfgang-Paulistrasse 15
> CH-8093 Zurich, Switzerland
>
> Phone: ++41-44-633 3031, Fax: ++41-44-633 1153
> e-mail: neumann@karto.baug.ethz.ch
> www: http://www.carto.net/neumann/
> SVG.Open: http://www.svgopen.org/
> Carto.net: http://www.carto.net/
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
>
>
>
--
View this message in context: http://www.nabble.com/use-Batik-rasterizer-to-get-same-result-as-in-Squiggle-tf3325677.html#a9265741
Sent from the Batik - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
Re: use Batik rasterizer to get same result as in Squiggle
Posted by Andreas Neumann <ne...@karto.baug.ethz.ch>.
Hello Johan,
hm, I couldn't get it to work either. The only way I found out which
works, was to exchange the
width="100%" with some pixel value, like width="1200".
Then I used the following command:
./build.sh svgrasterizer -d image_magick.pdf -m application/pdf
image_magick.xml.svg
It is an elegant mix of percentages and fixed values that you use. I
like it!
Andreas
compie wrote:
>I would like to use the Batik-rasterizer to get the same result as I see on
>the screen with Squiggle.
>
>Here is my SVG file:
>http://www.johanc.nl/dump/image_magick.xml.svg
>http://www.johanc.nl/dump/image_magick.xml.svg
>
>Viewed in Squiggle:
>http://www.johanc.nl/dump/squiggle.png
>
>Result from rasterizer:
>http://www.johanc.nl/dump/rasterizer.png
>
>I have been trying to use the -w, -h, -maxw, -maxh, -a and -dpi options to
>get the same result as in Squiggle, but the result only gets worser.
>Can someone point out the options I need to get my SVG file correctly
>rasterized?
>
>P.S. The SVG file is well-formed and valid and it displays correctly in
>Firefox 2, IE7 (with Adobe SVG viewer plugin).
>See:
>http://www.johanc.nl/dump/firefox.png
>http://www.johanc.nl/dump/ie.png
>
>
>
--
----------------------------------------------
Andreas Neumann
Institute of Cartography
ETH Zurich
Wolfgang-Paulistrasse 15
CH-8093 Zurich, Switzerland
Phone: ++41-44-633 3031, Fax: ++41-44-633 1153
e-mail: neumann@karto.baug.ethz.ch
www: http://www.carto.net/neumann/
SVG.Open: http://www.svgopen.org/
Carto.net: http://www.carto.net/
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
Re: use Batik rasterizer to get same result as in Squiggle
Posted by Tonny Kohar <to...@kiyut.com>.
Hi,
On Thu, 2007-03-01 at 00:41 -0800, compie wrote:
> I would like to use the Batik-rasterizer to get the same result as I see on
> the screen with Squiggle.
>
> Here is my SVG file:
> http://www.johanc.nl/dump/image_magick.xml.svg
> http://www.johanc.nl/dump/image_magick.xml.svg
>
If you look at the svg xml source, the width is specified as 100%, so
the batik rasterizer will use default width which is 400 px, you need to
change the svg root element width attribute to the size you want eg:
1195, or play with rasterizer options width and height
The user agent eg: batik squigle or firefox, etc will intepret 100% to
be the width of the viewer
Regards
Tonny Kohar
--
Sketsa
SVG Graphics Editor
http://www.kiyut.com
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org