xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pascal Sancho <pascal.san...@takoma.fr>
Subject Re: Image Print size and quality
Date Tue, 17 Jan 2012 15:47:09 GMT
We use imageMagik

Le 17/01/2012 15:32, Klearchos Klearchou a écrit :
> Pascal,
> the information that you provide are valuable.
> Can you propose any open source library in order to manipulate the 
> quality/resolution of the image?
> I tried the imgscalr, getScaledInstance(), Thumbnailator and some more 
> but they do not provide em exactly what I want.
> I haven't tried yet JMajick.
> Thanks again.
> On 1/17/2012 4:18 PM, Pascal Sancho wrote:
>> Quality loss may depend on PDF viewer settings and capabilities
>>     (anti-aliasing, zoom factor, etc.)
>> Also, the result can seem better if you first resample your image before
>> using in PDF, to get the best fit on screen reading, but can become
>> worse on printing.
>> Depending on what usages your PDF are for (reading on screen, Laser
>> printing, Offset printing, low weight downloading, etc.)
>> There is no perfect solution there.
>> For example, we (my compagny) produce images with different
>> quality/resolution for identified purposes, and generate as many PDF files.
>> The only constant over various resampled images is the real size:
>> for instance, a square image (1"x1") will give:
>> 96x96, rez 1/96" for screen reading;
>> 300x300, rez 1/300" for Laser printing;
>> 120x120, rez 1/120" for Dowload _and_print;
>> etc.
>> Le 17/01/2012 14:48, Klearchos Klearchou a écrit :
>>> Hi Pascal,
>>> yes indeed this was one of my problems.
>>> I will test it to see the results.
>>> In case I will still have to manipulate the image outside of the FOP do
>>> you have any solution to propose regarding:
>>> How to change the print size of the image (like gimp) in order not to
>>> loose image quality and at the same time to show it smaller inside the PDF.
>>> Thank you.
>>> On 17/1/2012 3:42 PM, Pascal Sancho wrote:
>>>> Hi,
>>>> I guess that by "the result is problematic with very tall images" you
>>>> mean that image can overflow the page when h/w ratio is too high.
>>>> If this is the case, you can use "max-height" XSL-FO equivalent:
>>>> <fo:external-graphic src="{$imageUrl}"
>>>>       block-progression-dimension.optimum="$my_minimal_height"
>>>>       block-progression-dimension.maximum="$my_maximal_height"
>>>>       content-height="scale-to-fit"/>
>>>> Le 17/01/2012 12:17, Klearchos Klearchou a écrit :
>>>>> Dear FOP users,
>>>>> I want to change an image's print size in order to add it inside a PDF.
>>>>> I want to do this in order not to loose any quality.
>>>>> The image must look smaller inside the PDF but the quality should be
>>>>> same with the original image.
>>>>> I know that I could do something like this in my XSLT
>>>>> (content-width="scale-to-fit"):
>>>>> <fo:external-graphic src="url('{$imageLink}')"
>>>>> content-width="scale-to-fit" border="solid 0.1pt" width="90mm" />
>>>>> <fo:block space-before="{$space}"/>
>>>>>                                        (<xsl:value-of select="$title"/>)
>>>>> <fo:block/>
>>>>> <xsl:value-of select="$description"/>
>>>>> </fo:block>
>>>>> but the result is problematic with very tall images.
>>>>> Thus I thought that I should manipulate the image before passing it to
>>>>> I used GIMP and I saw that if I change the print size of the image FOP
>>>>> uses this size and the quality of the image is very good.
>>>>> Anybody knows how to solve this problem?
>>>>> Thank you in advance.


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

View raw message