Unknown condition on GIMP's decision to use 72ppi or 300ppi

Hi all,

I have one little-big problem … After upgrading my computer GIMP seems to be opening files sent to him from RawTherapee as 72x72ppi resolution instead of 300x300ppi … It drives me nuts that I have to manually change that every time before exporting … I have no idea how GIMP decides to open some files with 72x72 Vs 300x300 … Before upgrade I never had to change ppi of files from RT … it was always 300x300

I’ve verified that old files (before upgrade) gimp opens as 300x300 but tif files from upgraded RT 72x72 and some other files even completely weirdly like this file below (which is just screenshot) … gimp wants to open file with 64.008x64.008 ppi … for the sake of God why ???


thanks much and regards, ~dan

Maybe same as this topic opened just 2 days ago?

I don’t know why this has changed. Maybe GIMP now reads more metadata from the image. But the more important point is that the PPI is not defined as long as it is a digital image. Only when the image is displayed/printed can you calculate the PPI. Or you can define a PPI and then get the size of the displayed/printed image in inches. PPI is not an indicator of image quality.

Old monitors had ~72ppi. That’s why it is a pre defiend value in many programs. But modern ones have 72-160ppi and the iPhone for example has 460ppi.
On the other hand, 300ppi is a common value used by many printers, so it is used by other programs.

thanks … I have both 300s checked … interesting stuff … file provided above considers GIMP to be 64.008x64.008 … why for the sake of God …

GIMP somehow reads the ppi (which is I know, I know virtual thing) from files and it opens some files with 300x300, some other files 72x72 and file above as 64.008x64.008 … I would love to understand why …

thanks and regards, ~dan

If those Exif resolution tags are present in a file, they are used. If they are not (or not specified by the exporting app), the Exif spec says to assume 72…

ok … archive here with 3 files … files are ALWAYS opening in gimp with ppi resolution as name indicates

I tested 2 versions of GIMP … my standard version 2.10.38 from my distro ++ 2.99.18 from flatpak … behaviour is always same … files are opening each with different ppi

my point is that I would love to

  1. know why ??? o.O it drives me nuts :smiley:
  2. to make RT to export files for gimp with 300ppi tag set (like it was doing in 5.8 - my previous version)

72DPI is a universal default when there is no resolution. So when you see 72DPI it is probably because the information is missing.

Only to understand… what is the problem to have Gimp opening files with 64ppi?

No problem … I am resizing the size of the final pictures for export based on mm (milimetres) and I need a ppi for that … It annoys me that I have to manually always change the ppi … I never had this issue before … All tif files (from RT or DT) were in GIMP being opened by default as 300ppi images … now they are not …

This one has the correct metadata and should open fine (if not, looks like a bug in GIMP):

[System]        FileName                        : DT_exported_72ppi.tif
[IFD0]          XResolution                     : 300
[IFD0]          YResolution                     : 300
[IFD0]          ResolutionUnit                  : inches
[IFD0]          Software                        : RawTherapee 5.10

And so should this one:

[System]        FileName                        : GIMP_exported_from_DT_300ppi.jpg
[JFIF]          ResolutionUnit                  : inches
[JFIF]          XResolution                     : 300
[JFIF]          YResolution                     : 300
[IFD0]          XResolution                     : 300
[IFD0]          YResolution                     : 300
[IFD0]          ResolutionUnit                  : inches
[IFD0]          Software                        : GIMP 2.10.38

The last one has “weird” metadata in it, but doesn’t look like GIMP is doing anything wrong:

[System]        FileName                        : spectacle_screenshot_68ppi.png
[PNG-pHYs]      PixelsPerUnitX                  : 2520
[PNG-pHYs]      PixelsPerUnitY                  : 2520
[PNG-pHYs]      PixelUnits                      : meters

(2520 / m = 64.008 / in)

FYI, I’ve used exiftool -a -u -s -G1 to get the outputs above.

Hi kmilos … thanks for your input …

se seems like a bug … I was testing with two GIMPs (stable 2.10.38 + devel 2.99.18) and both open file by default with 72x72 ppi …

Could you please kindly confirm … I just see this with opening the file attached above


file is same

> exiftool -a -u -s -G1 ~/Pictures/tmp/DT_exported_72ppi.tif | egrep -i resolution\|300\|72
[System]        FileName                        : DT_exported_72ppi.tif
[IFD0]          XResolution                     : 300
[IFD0]          YResolution                     : 300
[IFD0]          ResolutionUnit                  : inches

> md5sum ~/Pictures/tmp/DT_exported_72ppi.tif
a1a01e30da3136b2b88fed66851fff0f  /home/dpecka/Pictures/tmp/DT_exported_72ppi.tif

That’s a bit misleading, sorry. The PPI is defined in the EXIF which is part of the digital image file. The tag numbers are 0x011a and b, IIRC.

It is not a necessary action to “calculate the PPI”.

Yes it is written there, but what does it tell you?

supposed real world size of the image o.O in centimetres or inches ? I know I know, that `real world size’ of image in digital form is highly fluid concept, but this is why I’ve prepended it with word “supposed” …

It tells us the pixels per linear dimension to be used by a printer. It does not affect the image size on a computer monitor.

The linear dimension is defined in a separate EXIF tag, 0x0128 ResolutionUnit e.g. “inches”

see http://kronometric.org/phot/std/Exif2-2.PDF

Yes, exactly. In other words, it’s a random number to calculate a random size in inches.

And do you have a use case for this? No one is going to shoot a photo, then print it, and then be surprised that it is 10x15 inches.
Isn’t it always the other way around? I’d like to print an image in a specific size and dpi. (Defined by the printer or the use of the image.) Then I can check if my image has enough pixels.

The only use I can see for DPI within an image is when I have scanned the image. Then I can reprint it at the same DPI to get an image of the same size.

2 Likes

Exif is a Standard of the Japan Electronics and Information Technology Industries Association and it is they who presume the tags’ use cases. See http://kronometric.org/phot/std/Exif2-2.PDF

It’s PPI, not DPI. DPI refers for example to the splodges per inch from a print head.

I don’t print and therefore have no use at all for the Exif ‘Xresolution’, ‘Yresolution’ and ‘ResolutionUnit’ tags.

This is true. But it is often used as a synonym, even in the Exif documentation you linked to.

And this screenshot even shows why RawTherapee writes 72x72ppi resolution instead of 300x300ppi. It’s the default when the resolution is unknown.

Even if you would, you would have no use for them. This tags are useless for digital photos from an digital camera.

Points taken.