How can I get the DPI of an image?

I use a scanner to scan my samples and I use different DPI. As the scale depends on resolution, is there a way so that ImageJ can automatically detect the scan resolution of my image? This way I can assign scale values to each image I open.


Hi insertsk8,

There is a slight chance the resolution has been stored in the tiff file by the scanner. When you open the image, can you do Image>Show Info and if so, is there anything about pixel size, resolution, dimensions? You can copy the text in the info window and post it here.

You can also access text in the window, break it up in lines (into an array) and flesh out the resolution from that text, if it is there.

1 Like

Yes, by doing that my .tiff files show the resolution but not my .jpg files. This works fine for me. However, I wonder if there’s any way to “detect” the resolution without having that kind of information (?)

By the way here is some extra information about ImageJ and DPI:

1 Like

Scientific use requires tiff anyway :wink:
Unless the image collecting application puts the info in the file, there is no way to get it. You will never know if the sample was A4 recorded @100 dpi or A5@200 dpi.

1 Like