« Return to Thread: background-image on 0.94

Re: background-image on 0.94

by Sam Fuqua :: Rate this Message:

Reply to Author | View in Thread

Hi Andreas,

I'm quite sure that it has an embedded resolution of 72dpi.  I opened it in GIMP, and that was the resolution that I was given.
If it does turn out to be different, then I will either resize it or try to find another way of embedding the image

Thanks

Sam

On Tue, Jun 23, 2009 at 2:06 PM, Andreas Delmelle <andreas.delmelle@...> wrote:
On 23 Jun 2009, at 18:09, Sam Fuqua wrote:

Hi Sam


I'm trying to render a PDF that uses a 72dpi gif as the background-image in the region-before.  The image is considerably smaller than the size of the region and so I have "no-repeat" in use.
When the PDF is returned, the image is stretched to the point that a 500 pixel wide image (which should fit with no issues) is being cut off on both ends as well as dramatically reducing the image quality.

I think this may be expected, as XSL-FO does not have any properties related to scaling of the background image. Are you absolutely sure the GIF has an embedded resolution of 72dpi? (I have run into image viewers that simply show a default of 72dpi if they do not succeed in extracting the image's native resolution)
If not, that may be the cause: if the native resolution of the image is significantly higher than 72dpi, the picture will appear stretched.


Is there a setting I need to change on the FOP so that it does not distort my background image?
If not, what recourse can I take to keep the image in?

The usually suggested workaround (for a page-background) is to insert the image in the FO as a fo:external-graphic in one of the generally unused side-regions (region-start/region-end). Using a fo:external-graphic allows to control scaling via the width/height and content-width/content-height properties.


HTH!

Andreas


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




--
Sam Fuqua
ΣΝ ΘΗ 454

 « Return to Thread: background-image on 0.94