Re: Pixels per Inch [message #37388 is a reply to message #37383] |
Mon, 15 December 2003 10:00   |
JD Smith
Messages: 850 Registered: December 1999
|
Senior Member |
|
|
On Mon, 15 Dec 2003 04:45:50 -0700, Pepe wrote:
> Good morning,
>
> I have created a PNG image using the "write_png" routine. I have
> subsequently been asked to increase the resolution of this image from 96
> pixels per inch to 300 pixels per inch, how can I do this ?
>
> I would be very grateful if someone could point our to me how to
> determine the resolution of a PNG image, and how to vary it (if
> possible) ?
>
> Thanks in advance for the help.
It depends on how many "inches" you intend to output the image to.
This is a basic and common mis-understanding of how image resolution
works. A bitmap image like a PNG file has a specific size in pixels,
nxm say, but does not have an associated "physical size". The
physical size of this image depends on the device used to show it: on
my monitor, for instance, it would be around n/100 x m/100 inches,
since I display around 100dpi. On a 1200dpi printer, it would be 12
times smaller. So what about that nice 1200x800 digital picture you
printed on a 1200dpi printer: it certainly wasn't 1 inch x 2/3 inch!
This is the main source of confusion: the printer or printer driver
resized your image to 1200dpi by interpolating or rebinning it. Just
because it was printed on 4x6" photo stock doesn't mean it actually
contains 4800 x 7200 pixels of information: most of it was
manufactured by the printer (another semi-relevant complication is
that color printers use patterns of solid "dots" of color to build up
images: much different from a monitor pixel which can display any
color by varying the RGB intensity, so 100dpi on screen != 100ppi on a
printer).
Further complicating the issue is the insistence of many people to
refer to, e.g., 300dpi JPG images: this usually means they've assumed
some "natural" size of the image in inches, and scaled the pixel size
to that. And indeed many bitmap formats, including JPG and PNG, add
to the confusion by supporting an image header which specifies the DPI
resolution: but this does not do *anything* to the actual pixels or
the amount of detail in the image, it just makes a "suggestion" to
programs using the image regarding how large to display or print it
(i.e. how much interpolation/rebinning should be done). Many programs
ignore this information altogether.
On the other hand, vector data like postscript files *do* have a
physical size, but they don't have a pixel size. This is mostly
relevant for printers, and the printer resolution enters in
determining how fine accurately-printed postscript features are (think
of two thin lines quite close to each other). To display or print
postscript, the program or device needs to have at least an
approximate understanding of the resolution of the display or printer.
In short, I suspect what they really meant is triple the pixel size of
the image, and they will print it at the same physical size. If they
really just want you to change the header value "96" to "300", I think
PhotoShop will do this for you, but remember that this does nothing to
the actual information and resolution present in the image.
JD
|
|
|