size of images placed using

2002-09-18 Thread Ambar Roy

Hi,
When I place a image using external-graphic without
specifying the size of the image, the image is rendered at a
fixed dpi (72 dpi perhaps). This happens even if the file
has a method of specifying dpi, like JPG files. Why does
this happen? According to the XSL spec, the image should be
placed as per the size of the image if content-width and
content-height is set to auto.
I suppose this is a known bug/feature of fop, or I am
misinterpreting the XSL spec. Is it a difficult thing to
modify the FOP source to achieve this result. I am using
FOP-20.4. Can I expect to do this in a reasonable amount of
time? I have experience with java and c++ programming, but I
haven't really tried to hack the FOP source. Any pointers?

Ambar Roy


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




Re: size of images placed using

2002-09-19 Thread Ambar Roy

> I look to source code, and IMHO you must modify
> src/org/apache/fop/images and
src/org/apache/fop/images/analyzer
> classes to suport DPI (extract dpi from file and compute
"right"
> width/height)
Thanx for the info. I did modify these classes, and also
ExternalGraphic.java in org/apache/fop/fo/flow.

Now what I wan't to know is that the behaviour according to
the xsl spec is that images have to be sized as per the size
given in the image and default to something like 96/72dpi
only when that is not available. But in fop (and it seems
antenna house xsl formatter) seems to only render images
with 72 dpi unless a size is given. Isn't this a bug in the
software? Is something being done about this in the next
version of FOP?

Ambar




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




Re: size of images placed using

2002-09-19 Thread Ambar Roy

> If you know how to extract the dpi from the file then it
should only be
> a matter of scaling the dimensions.
> How is the dpi retrieved, is it format specific.
>
> If you know how to do it then why not submit a patch and
the rest of it
> should be easy to work out.
Well, I have done this only for jpeg images and for
fo:external-graphic right now, against the fop-20.4 release
sources. I have changed the image classes to support dpi.
And set that to the default 72 dpi for now. Only for jpeg am
I setting the real dpi from the file. But I have seen at
various places where the 72 dpi is kinda hard coded into the
code. The modification that I have done right now solves my
purpose, but I suppose I will also need to add support for
this in TIFF images and PNG sometime sooner. Who is the
maintainer of these classes, and how do i submit a patch. I
am using windows, so what tools will i require?

Ambar


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