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 Rob Hinst <ro...@exobitnetworks.com> on 2006/12/22 14:27:36 UTC

Rasterizing dynamically generated images

I have a script that takes a piece of clip art on the server, resizes it and
changes the color with imagemagick, and then outputs the new image to the
browser. I've embedded some of the resulting images in my SVG document using
the following tag:

<image
xlink:href="http://mydomain.com/clipart.php?i=ca_someimage&amp;c=00a650&amp;
w=156.95&amp;h=191.35" x="0" y="0" width="156.95" height="191.35" />

Basically that outputs an image that is about 156x191, with a color of
#00a650. I don't know if the floating point dimension sizes is bad, but it
seems to work ok. It takes a little while for the image to pop up in the SVG
document, since imagemagick has to do its thing each time, but it eventually
shows up just fine.

When I use batik-rasterizer to rasterize the SVG to a JPG, the image shows
up in the correct location at the correct size, but the colors are all
psychadelic. Does anyone have any idea what might cause this?  The
clipart.php script outputs the image in PNG format, if that matters.

Thanks,

Rob Hinst


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


RE: Rasterizing dynamically generated images

Posted by Rob Hinst <ro...@exobitnetworks.com>.
Batik 1.6 on debian 3.1
 

-----Original Message-----
From: Dieter von Holten [mailto:info@dvholten.de] 
Sent: Friday, December 22, 2006 8:51 AM
To: batik-users@xmlgraphics.apache.org
Subject: Re: Rasterizing dynamically generated images

Hello,

what batik-version are you using ? what platform?
greetings
dieter von holten

----- Original Message -----
From: "Rob Hinst" <ro...@exobitnetworks.com>
To: <ba...@xmlgraphics.apache.org>
Sent: Friday, December 22, 2006 2:32 PM
Subject: RE: Rasterizing dynamically generated images


> I take that comment back about it looking "psychadelic".  The 
> foreground color on the clipart might actually be accurate - but the 
> background is purple instead of white. Actually, the background is 
> *supposed* to be transparent, but it's not in the SVG, which is another
one of my problems.
> To illustrate the whole process, here's a little more info, in a 
> linear
> step-by-step:
>
> I start off with a .eps version of the clip art on the server. The 
> background on this .eps is transparent.
>
> My SVG doc links to clipart.php (with some parameters added into the 
> URL
to
> convert the color/size)
>
> Clipart.php outputs a PNG graphic
>
> The clip art shows up in the SVG document with a white background 
> instead
of
> a transparent background.
>
> When I rasterize the SVG to JPG, the background color becomes purple 
> and
I'm
> not sure if the foreground color is correct - it looks vaguely lke the 
> original color but maybe a little darker - although that could just be 
> me, or an illusion caused by the background color.
>
> Any help would be greatly appreciated.
>
> -Rob
>
> -----Original Message-----
> From: Rob Hinst [mailto:rob@exobitnetworks.com]
> Sent: Friday, December 22, 2006 8:28 AM
> To: batik-users@xmlgraphics.apache.org
> Subject: Rasterizing dynamically generated images
>
> I have a script that takes a piece of clip art on the server, resizes 
> it
and
> changes the color with imagemagick, and then outputs the new image to 
> the browser. I've embedded some of the resulting images in my SVG 
> document
using
> the following tag:
>
> <image
>
xlink:href="http://mydomain.com/clipart.php?i=ca_someimage&amp;c=00a650&amp;
> w=156.95&amp;h=191.35" x="0" y="0" width="156.95" height="191.35" />
>
> Basically that outputs an image that is about 156x191, with a color of 
> #00a650. I don't know if the floating point dimension sizes is bad, 
> but it seems to work ok. It takes a little while for the image to pop 
> up in the
SVG
> document, since imagemagick has to do its thing each time, but it
eventually
> shows up just fine.
>
> When I use batik-rasterizer to rasterize the SVG to a JPG, the image 
> shows up in the correct location at the correct size, but the colors 
> are all psychadelic. Does anyone have any idea what might cause this?  
> The clipart.php script outputs the image in PNG format, if that matters.
>
> Thanks,
>
> Rob Hinst
>
>
> ---------------------------------------------------------------------
> 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
>


---------------------------------------------------------------------
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: Rasterizing dynamically generated images

Posted by Dieter von Holten <in...@dvholten.de>.
Hello,

what batik-version are you using ? what platform?
greetings
dieter von holten

----- Original Message -----
From: "Rob Hinst" <ro...@exobitnetworks.com>
To: <ba...@xmlgraphics.apache.org>
Sent: Friday, December 22, 2006 2:32 PM
Subject: RE: Rasterizing dynamically generated images


> I take that comment back about it looking "psychadelic".  The foreground
> color on the clipart might actually be accurate - but the background is
> purple instead of white. Actually, the background is *supposed* to be
> transparent, but it's not in the SVG, which is another one of my problems.
> To illustrate the whole process, here's a little more info, in a linear
> step-by-step:
>
> I start off with a .eps version of the clip art on the server. The
> background on this .eps is transparent.
>
> My SVG doc links to clipart.php (with some parameters added into the URL
to
> convert the color/size)
>
> Clipart.php outputs a PNG graphic
>
> The clip art shows up in the SVG document with a white background instead
of
> a transparent background.
>
> When I rasterize the SVG to JPG, the background color becomes purple and
I'm
> not sure if the foreground color is correct - it looks vaguely lke the
> original color but maybe a little darker - although that could just be me,
> or an illusion caused by the background color.
>
> Any help would be greatly appreciated.
>
> -Rob
>
> -----Original Message-----
> From: Rob Hinst [mailto:rob@exobitnetworks.com]
> Sent: Friday, December 22, 2006 8:28 AM
> To: batik-users@xmlgraphics.apache.org
> Subject: Rasterizing dynamically generated images
>
> I have a script that takes a piece of clip art on the server, resizes it
and
> changes the color with imagemagick, and then outputs the new image to the
> browser. I've embedded some of the resulting images in my SVG document
using
> the following tag:
>
> <image
>
xlink:href="http://mydomain.com/clipart.php?i=ca_someimage&amp;c=00a650&amp;
> w=156.95&amp;h=191.35" x="0" y="0" width="156.95" height="191.35" />
>
> Basically that outputs an image that is about 156x191, with a color of
> #00a650. I don't know if the floating point dimension sizes is bad, but it
> seems to work ok. It takes a little while for the image to pop up in the
SVG
> document, since imagemagick has to do its thing each time, but it
eventually
> shows up just fine.
>
> When I use batik-rasterizer to rasterize the SVG to a JPG, the image shows
> up in the correct location at the correct size, but the colors are all
> psychadelic. Does anyone have any idea what might cause this?  The
> clipart.php script outputs the image in PNG format, if that matters.
>
> Thanks,
>
> Rob Hinst
>
>
> ---------------------------------------------------------------------
> 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
>


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


RE: Rasterizing dynamically generated images

Posted by Rob Hinst <ro...@exobitnetworks.com>.
I take that comment back about it looking "psychadelic".  The foreground
color on the clipart might actually be accurate - but the background is
purple instead of white. Actually, the background is *supposed* to be
transparent, but it's not in the SVG, which is another one of my problems.
To illustrate the whole process, here's a little more info, in a linear
step-by-step:

I start off with a .eps version of the clip art on the server. The
background on this .eps is transparent.

My SVG doc links to clipart.php (with some parameters added into the URL to
convert the color/size)

Clipart.php outputs a PNG graphic

The clip art shows up in the SVG document with a white background instead of
a transparent background.

When I rasterize the SVG to JPG, the background color becomes purple and I'm
not sure if the foreground color is correct - it looks vaguely lke the
original color but maybe a little darker - although that could just be me,
or an illusion caused by the background color.

Any help would be greatly appreciated.

-Rob

-----Original Message-----
From: Rob Hinst [mailto:rob@exobitnetworks.com] 
Sent: Friday, December 22, 2006 8:28 AM
To: batik-users@xmlgraphics.apache.org
Subject: Rasterizing dynamically generated images

I have a script that takes a piece of clip art on the server, resizes it and
changes the color with imagemagick, and then outputs the new image to the
browser. I've embedded some of the resulting images in my SVG document using
the following tag:

<image
xlink:href="http://mydomain.com/clipart.php?i=ca_someimage&amp;c=00a650&amp;
w=156.95&amp;h=191.35" x="0" y="0" width="156.95" height="191.35" />

Basically that outputs an image that is about 156x191, with a color of
#00a650. I don't know if the floating point dimension sizes is bad, but it
seems to work ok. It takes a little while for the image to pop up in the SVG
document, since imagemagick has to do its thing each time, but it eventually
shows up just fine.

When I use batik-rasterizer to rasterize the SVG to a JPG, the image shows
up in the correct location at the correct size, but the colors are all
psychadelic. Does anyone have any idea what might cause this?  The
clipart.php script outputs the image in PNG format, if that matters.

Thanks,

Rob Hinst


---------------------------------------------------------------------
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