xmlgraphics-fop-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kelly Campbell <c...@channelpoint.com>
Subject RE: Scaling of images
Date Wed, 13 Dec 2000 17:43:39 GMT
I've been looking around the web, trying to figure out what formats support
such a scaling definition, and how to get that information via the different
API's (Jimi, JAI, sun jpeg codec).

Here's a site with links to many of the different format specs:
http://www.dcs.ed.ac.uk/home/mxr/gfx/2d-hi.html

As Fotis pointed out, TIFF and JPG are the two main ones. I can't beleive
they left something like this out of PNG but managed to add a Gamma setting
to it (guess that's why it's called portable _network_ graphics, not
portable printer graphics.) Both JPG and TIFF can express this in pixels per
inch or per centimeter.

Unfortunately, it doesn't seem very easy to get this information out of Jimi
or JAI, but the sun jpeg codec has getXDensity, getYDensity, and
getDensityUnit in the JPEGDecodeParam interface. According to some mail in
the archives of the JAI interest list, these density params aren't
accessible via JAI, but since it just uses the jpeg codec underneath, they
can be used that way. 

Maybe Eric knows if it is possible to get scaling info for TIFF files using
JIMI or JAI?

-Kelly

-----Original Message-----
From: Fotis Jannidis [mailto:fotis.jannidis@lrz.uni-muenchen.de]
Sent: Wednesday, December 13, 2000 9:40 AM
To: fop-dev@xml.apache.org
Subject: RE: Scaling of images


A while ago we discussed scaling of images on the list. Our problem 
was: what is the conversion between pixels and document units? 

Now Anders Berglund from the xsl:fo working group clarified this: 

>>>>>>>>>>>
I thought the XSL CR (and the text has not
changed for several WDs) text was clear that IF a graphics format (like
JPEG and TIF) has an intrinsic size that it was used for the graphic (as
modified by the various scaling properties) and that IF a graphics format
(like GIF) did not have an intrinsic size defined the conversion to "real"
units was implementation defined BUT (in a Note) it is suggested that for
raster formats 1/96" for 1 pixel is a reasonable conversion.
<<<<<<<<<<

This means, we don't have to invent a factor (what I mistakingly 
thought), but there is a recommendation in the recommendation. 
Handling of image size would look like this: Check whether the 
image is in a file format which has intrinsic size definition. If yes, 
use this, if no, take the pixel size (* 1/96")

Fotis


Mime
View raw message