Jay Chiu wrote:

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.

The problem is that you are asking to subsample the image too much. The large image is reduced by 5x the small by 10x. Batik does not prefilter for large subsample values so you 'loose' pixels with subsample values this high and the result is aliasing effects.

   If anyone wants to write/contribute a block average or better
a true prefiltered resample operation I'm sure it would be
appreciated.  I can help with plugging it into Batik in the
right spot.

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


==================================================== 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 ([EMAIL PROTECTED]) 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]







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


------------------------------------------------------------------------



------------------------------------------------------------------------


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to