ImageJ changes the resolution to a default value



I recently got a code to process images in the ImageJ. And since I constantly lost resolution of some pictures, I think it might be an issue of different formats of the images (lossless vs. lossy). I tried to get the original images in 3 formats: jpg, png, and tif and tested on them. However, regardless of their various original resolutions, after being processed, they all become 96 dpi horizontally and vertically. Even opening an image and then resaving it without processing decreases the resolution to 96 dpi, regardless of the format. Thus, I don’t think this issue is caused by the images’ formats.

Does ImageJ have a default dpi value for the images processed? If so, how can I change it? If not, is there any other programmable software that can do batch processing without losing the resolution? Thank you very much.


Good day!

dpi in digital image processing is mostly irrelevant.

It is important for scanning and printing.

If you need to set a spatial scale, you can do this in ImageJ but be assured that it doesn’t change the resolution of your images. A scale is a scale is a scale …

If you set different dpi or scales for an image the number of pixels does not change!



An ImageJ-scale is only saved when the TIF-format is used.
AFAIK 96dpi is the default when using Windows and has nothing to do with ImageJ.


Thank you for your reply Herbie! Just for whoever also have this issue in the future, I found a way in Photoshop that can do the same cropping without losing any dpi. You can play around with it if you have some restrictions on the dpi.