DPI 101 Question - RealWorld forums

Log-in or register.

DPI 101 Question

bohica
on August 6th 2007

Ok I'm a little confused about this one and need an image expert to please explain. I have a Nikon D40 and take pics in Fine mode (3872_x_2592) which had DPI of 300. When I resize the picture to anything even 100% it turns out with 96 dpi (in the metadata). Ok so I put in the -d300 switch, well now of course the DPI is 300 but the resolution is 300% (11616_x_7776) even combined with the -^3872 switch. The -d switch seems to override the -^. Why is it I cannot, for testing, resize the pics @100% and 300dpi like the pics what comes out of the camera? One reason for this question is if I use "M" to keep metadata, it reflects the original and not the new obviously. This is NOT the case but what if I wanted to keep the original pic size and dpi and just run the sharpen switch, you can't do it because the DPI effects the res output. Just curious if anyone can tell me why.

TIA

Vlasta
on August 6th 2007

OK, here are a few facts about PhotoResize that could explain, what has happened to you.

The metadata are either copied or deleted (the default), the tool cannot currently update them. The dpi is taken from the jpeg/jfif header. If you resize to 100%, the dpi should stay the same (it is a bug it it does not), but maybe the metadata was deleted and the application you have used to display the dpi just displayed a default value (96) if it cannot find EXIF metadata.

The resizing switches override each other, the last one used takes precedence.

You can change dpi only if you also use the -t switch. This requires an additional pass, but this one is lossless, it just changes the number in the jpeg header.

bohica
on August 6th 2007

Thanks for your reply Vlasta.
You are correct, if I do not use the Metadata switch and open the properties of the result file it shows 96 dpi. You said this is the default value, does that mean it says 96 but may actually be something else? So if I use the -dX switch and no "M" it does not record that in resulting EXIF data after resize; it doesn't copy the original metadata so it uses a default of 96 no matter what -dX was specified? I can work around all this, I'm just curious how it works so I'll know what I'm getting by doing it one way vs. another.

Thank again!

Vlasta
on August 7th 2007

It is probable, that 96 is simply displayed by the viewer, when the DPI is not specified in the EXIF data (or if there is no EXIF).

The EXIF metadata is never modified, just copied.

The -dX switch is only a way how to specify the resizing parameter. If you use it, it resamples the image so that the physical dimensions are kept. That is, if the source image has resolution 300 dpi and is 300 pixels wide and you resample to 100 dpi, width of the resulting image will be 100 pixels. Resolution is read and written to jfif header, not to EXIF.

wia
on December 2nd 2007

The dpi-value in the EXIF is meaningless. It is a fictitious number.
More info, read my article:
Misunderstandings about dpi - [url=http://www.dpiphoto.eu/dpi.htm]www.dpiphoto.eu/dpi.htm[/url]

Page views: 5598       Posts: 6      
I wish there were...
What about ICL files?
Select background