[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] Images in PDF appear too large
Hi Chris, Two things come to mind: (1) Since I'm specifying the size of the image *in pixels*, it would seem that FOP should respect that and not scale the image based on dpi. For screenshots especially, it's easy to see the pixel dimensions of an image right from the desktop -- but dpi? And what's the point of specifying image dimensions in pixels (like you do for html) if FOP is going to ignore them anyway. (2) The FOP 0.93 documentation says it ignores dpi (which is apparently not accurate): "Some bitmapped image file formats store a dots-per-inch (dpi) or other resolution value. Since PDF and most output formats do not have a concept of resolution, but only of absolute image units (i.e. pixels) FOP ignores the resolution values as well. Instead, FOP uses the dimensions of the image as specified in the fo:external-graphic element to render the image." From http://xmlgraphics.apache.org/fop/0.93/graphics.html#resolution. I think the bottom line here is that specifying pixel dimensions (if you want to display an image "as-is") isn't too useful with FOP since there's no way to way to tell FOP to ignore the dpi info. So far just setting the dpi to 96 in the image files themselves seems to be the only way to get them to display properly. On 4/27/07, Chris Chiasson <chris@chiasson.name> wrote: > Assuming the matrix of pixels for an image is fixed, changing the dpi > of the picture is like telling the receiving application that the > image takes up different physical sizes: > > example: > A 100 pixel by 100 pixel picture at 100 dpi (in both horizontal and > vertical directions) = 1 inch by 1 inch picture. > > Supplying the same pixels and saying the picture is at 300 dpi will > give a 1/3 inch by 1/3 inch picture. > > This doesn't happen in web browsers because they ignore picture dpi, AFAIK. > > So, it makes sense that your 300 dpi picture is smaller if it has the > same pixel content as the other pictures. > > I assume you already knew all of this and that the scaling attributes > of DocBook are confusing to you. In that case, can we start over? I am > lost. >
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]