Resolution - DPI, PPI & LPI (was: Wide PNG's displaying only coloured stripes?)

David Bovill david at openpartnership.net
Tue Feb 6 11:18:22 EST 2007


No thanks a lot for the info!

In simple terms I have a piece of graphing software which I can
control in various ways - one is to set the "size" of the resulting
image. The image will be scaled proportionally to fit into this
"size". Now the size is in inches so you can basically pass the
programme size="41.6667,41.6667" and it will scale the image to print
it within a square of about 41 inches.

Now I wanted to be able to figure out how many inches to set the size
in order to get 4000 x 4000 pixels and wrote a function:

on convertSizeToInches @pixelSize
    set the numberformat to "0.0000"
    repeat with itemNum = 1 to the number of items of pixelSize
        put (item itemNum of pixelSize) / 72 into item itemNum of pixelSize
    end repeat
end convertSizeToInches

Now looking at the resulting image which should be 41.6667 inches wide
- it ends up being 4014 pixels according to the Finder and the
formattedwidth property of the image. This means then that the
software is using 4014 / 41.6667 = or just over 96dpi. Now i guess
what you are saying is this is just arbitrarily set by the graphing
software and there is no real way of figuring it out from first
principles?

I have a similar problem with GoogleEarth where I need to figure out
how many pixels on screen is a kilometer at a given height?



More information about the use-livecode mailing list