I have four specific cases that should be automatically handled : Let X be maxWidth, let Y be maxHeight (in px):
1. if imgWidth > X and imgHeight <= Y --> uniform scale until imgWidth fits to X 2. if imgWidth > X and imgHeight > Y --> uniform scale until imgWidth and imgHeigth fits to X and Y 3. if imgWidth <= X and imgHeight > Y --> uniform scale until imgHeigth fits to Y 4. if imgWidth <= X and imgHeight <= Y --> Leave as is. Is there a way to do that? By the way, I converted the GIF into PNG. The problem remain same. I resized it to W/H = 500/476, it worked properly (both as GIF and PNG) -----Message d'origine----- De : Jeremias Maerki [mailto:[EMAIL PROTECTED] Envoyé : mercredi, 31. août 2005 15:04 À : fop-users@xmlgraphics.apache.org Objet : Re: RE : Endless Loop in PDF On 31.08.2005 14:37:35 michella wrote: > Ok... But how could it be possible that it had worked properly with the > older version of FOP? Rather, it could be that FOP Trunk finally does what the specification says. :-) content-height was not supported by FOP 0.20.5 and the width/height properties were used to scale the image which is clearly wrong. > The problem I have is that I may have some GIF images that may be > larger/higher than the area on the PDF, and some which are smaller. For > the bigger one, it should scale-to-fit, and the smaller ones leave as > is. In that case I think you'd use just b-p-d as before but left i-p-d off so it is automatically determined and used content-width="scale-to-fit" and content-height="scale-to-fit. Not sure if this will work. I'm currently writing the demo file for external-graphic. After that I can verify if FOP really does what it should in every case. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]