NOTE to the Dev Guys about 72 PPI output

@Thanatomanic 72 seems to be the EXIF default value. Search for “dpi” here.

1 Like

There has been some effort to support this issue: Allow resizing to physical dimensions · Issue #4894 · Beep6581/RawTherapee · GitHub
Unfortunately it has lost traction.

1 Like

Which is strange for PNG because of this:

https://github.com/Beep6581/RawTherapee/blob/dev/rtexif/rtexif.cc#L3327


@floessie - thanks for that.

@Thanatomanic I can’t use IrfanView as it appears to be windows-only, but everything else reports the images at 72ppi - even Macs own system exif viewer.
But just out of curiosity I opened an image in GIMP - and viola, 300.

So, I was assuming that RT literally tagged the output images at 72ppi in the metadata - but do I now understand that it outputs images WITHOUT any ppi tag?

2 Likes

Hmm, interesting indeed. Perhaps this is an issue of IrfanView. GIMP seems to read the ppi information just fine.

EXIF in PNG is an extension, so it could well be that IrfanView isn’t prepared for it.

@Andy_Astbury1 I’ve created this issue as there seems to be at least an inconsistency in the way RT handles the ppi values for different export types: Inconsistent 'default' TIFF-tags when exporting to JPEG, PNG and TIFF itself · Issue #5787 · Beep6581/RawTherapee · GitHub

1 Like

@Thanatomanic - ok, though I have just exported a raw file as jpeg, tiff, 8 & 16bit PNG and they all report as 72ppi in Photoshop - which isn’t known for getting this kind of stuff wrong - and also my OS preview exif inspector.
If it’s of any consequence the RT install is the 5.8 Mac release - I’ll give it a try on the Linux dev build to see if there is any difference should I??

Hmm that’s very interesting. The PNG and JPEG are explicitly getting their Exif tags XResolution, YResolution and ResolutionUnit set to conform to 300 dpi.

Can you confirm in another way what the Exif information in your exported files is? Exiftool maybe?

@Thanatomanic - just checked in exiftool, PNG reports X and Y at 300, but TIFF has nothing specified for horizontal or vertical resolution.

I’ve actually learned something - I assumed it was impossible for a rasterised image to exist without a resolution tag!

1 Like

Does that mean that there are other ways for Photoshop to determine ppi? (I am not an expert)
It may be good to compare the metadata of a JPEG or PNG file exported from RT and from Photoshop and see which tags are different and could influence the apparent ppi.

@Thanatomanic

Hi Roel, here’s a link to these two files on Dropbox
4090RT is a 16bit full rez TIFF exported/saved from RT
4090Photoshop is a 16bit full rez TIFF from Ps with the source raw sent from ACR/Lr

Thanks for the reply and screenshot, but for TIFF files it’s clear what the difference is: RT simply doesn’t export the X Resolution, Y Resolution and Resolution Unit tags. For JPEG and PNG it does, but you say that despite that, Photoshop doesn’t recognize those files to be at 300 ppi.
Can you do a metadata comparison for a JPEG or PNG please? :slight_smile:

No,no Roel - checking back to my earlier post I mistyped - jpegs directly exported are fine, it’s just jpegs exported from another editor via a TIFF from RT that are not 300ppi - apologies.

But PNG files report on Mac OS and in Ps as 72ppi but in exiftool as 300

Thanks for the clarification! So no issue for JPEGs coming from RawTherapee.
PNGs are a little troubling though… Your metadata shows that the correct tags are set, however Photoshop doesn’t seem to recognize them. Could that also be caused by what Flössie described about EXIF-support being an extension for PNG instead of a default feature? Surely Photoshop should support that…?

1 Like

The PNG exif chunk specification is rather recent; prior to it, PNG metadata was supported in a separate workaround. Some softwares may still be relying on the workaround…

1 Like

If I look at the documentation of libpng I see the function png_set_pHYs and parameters res_x, res_y and unit_type that can be set. These look distinct from their Exif-counterparts. So it seems other methods are allowed and potentially useful to implement.

1 Like

Hello everyone,

It looks like Alberto Griggio has been working on this “issue” for ART:

I don’t know whether @Andy_Astbury1 can test ART on Mac (Andy’s setup).
Its next 1.4 version might be the last one with big improvements, afterwards it will be"only" bug-fixing stuff [1].

[1] ART new releases - #52 by gaaned92

1 Like

I’ve accidentally posted this in the wrong topic.

@Andy_Astbury1 You’ll be pleased to know that @floessie has ‘fixed’ the output of TIFF resolution metadata in RawTherapee. See: Add 300dpi resolution to exported TIFFs (fixes #5787) · Beep6581/RawTherapee@d033dbc · GitHub

All TIFFs will now have 300 dpi set in their metadata upon export. It’s a first step to a future where you can even set this value in the GUI yourself :slight_smile:

5 Likes

The PNG file format have a pHYs chunk, which apparently allows to specify physical pixel dimensions. Adobe Photoshop CC uses the pHYs chunk to determine the physical resolution - if for example you remove the pHYs chunk with TweakPNG from a PNG image set to 300 dpi with Photoshop, the latter will show that the physical resolution of the modified PNG file is now 72 pixels/inch.

1 Like