You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-dev@xmlgraphics.apache.org by Jay Chiu <ja...@ureach.com> on 2004/02/07 02:20:27 UTC

Re: Problem with scaling png image file in svg section

Thanks Chris. 

I tried with Batik Squiggle for the png images. If I does not
use <g transform="scale(xxx)">, the png image looks good in the
GUI, it does get scaled properly. But image with scale()
transform attribute losses quality, and the png file generated
by Squiggle is in bad quality. 

I am also sending the email to batik-user mail list. Hope Batik
team can also help.

Attache please find a svg file , a source png file and
generated
png file.

Thanks a lot.

Jay

** this is the resending to batik dev mailing list. The svg
file, png files can be accessed through fop-user mailing list.

====================================================
List:       fop-user
Subject:    Re: Problem with scaling png image file in svg
section
From:       Chris Bowditch <bowditch_chris () hotmail ! com>
Date:       2004-02-05 9:11:43
Message-ID: <402208CF.4010500 () hotmail ! com>
[Download message RAW]

Jay Chiu wrote:

> I generate fo file with svg section to hold absolute
positioned
> text and images. If the image size matches the width and
height
> attributes of the svg:image element, the image in final
> generated pdf looks fine. But if the image size is bigger
than
> the width/height attributes of the svg:image element, then
the
> quality of the image in the final pdf is very bad. 
> I include the png file in svg section of .fo file through
> <svg:image width="350" height="280" x="1mm" y="80"
> xlink:href="p2.png"/>

Have you tried running your SVG using Batik's squiggle? Does it
look 
okay there. If not, then this question should really be
directed
at the 
Batik guys, because FOP uses Batik to handle its SVG. If it
does
look 
okay in squiggle, then there could be an issue in FOP's SVG-PDF
Transcoder.

One other question: Does the image inside the SVG look okay if
you dont 
specify width and height attributes on svg:image?




________________________________________________
Get your own "800" number
Voicemail, fax, email, and a lot more
http://www.ureach.com/reg/tag


---- On Wed, 4 Feb 2004, Jay Chiu (jaychiu@ureach.com) wrote:

> 
> I generate fo file with svg section to hold absolute
positioned
> text and images. If the image size matches the width and
height
> attributes of the svg:image element, the image in final
> generated pdf looks fine. But if the image size is bigger
than
> the width/height attributes of the svg:image element, then
the
> quality of the image in the final pdf is very bad. 
> I include the png file in svg section of .fo file through
> <svg:image width="350" height="280" x="1mm" y="80"
> xlink:href="p2.png"/>
> 
> But the png file directly included in .fo scales fine.
> <fo:external-graphic src="url('p1.png')" width="120px"
> height="100px"/>
> 
> I use jfreechart to generate the chart image. Because of
> jfreechart's implementation,  I have to generate a big chart
> image and put it into a smaller space to have high
resolution.

> 
> Attached please find a fo file and the generated pdf file.
> 
> Can someone please tell me how to solve this problem?
> 
> Thank you very much.
> 
> Jay
> 
> ________________________________________________
> Get your own "800" number
> Voicemail, fax, email, and a lot more
> http://www.ureach.com/reg/tag
> 
> 
> 
> ATTACHMENT 1: application/pdf
> DISPOSITION: attachment; filename="r3.pdf"
> 
> 
> ATTACHMENT 2: application/octet-stream
> DISPOSITION: attachment; filename="r.fo"
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
> For additional commands, e-mail: fop-user-help@xml.apache.org
> 
> 


________________________________________________
Get your own "800" number
Voicemail, fax, email, and a lot more
http://www.ureach.com/reg/tag

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