Bug 420932

Summary: TIFF images with display resolution stored in pels/cm is displayed as ppi in image/properties panel
Product: [Applications] krita Reporter: Aaron Boxer <boxerab>
Component: File formatsAssignee: amyspark <amy>
Status: RESOLVED FIXED    
Severity: minor CC: amy, halla
Priority: NOR Keywords: triaged
Version First Reported In: git master (please specify the git hash!)   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: TIFF image with pixels/cm stored
Image with resolution stored in pixels/cm

Description Aaron Boxer 2020-05-02 23:01:26 UTC
Created attachment 128104 [details]
TIFF image with pixels/cm stored

1. run tiffinfo on attached image - resolution stored as 118 pixels / cm

2. Open attached image, and then open  image / properties

resolution is displayed as 118 pixels / inch
Comment 1 Halla Rempt 2020-05-04 12:27:40 UTC
That is strange, because both ImageMagick and Krita show me a resolution of 300x300 dpi when I open the attached image.
Comment 2 Aaron Boxer 2020-05-04 12:30:42 UTC
118 ppcm is 300 ppi.  I think the problem is just that properties displays the 118
Comment 3 Aaron Boxer 2020-05-04 12:32:06 UTC
oops, I think I upload the wrong image.
Comment 4 Aaron Boxer 2020-05-04 12:40:46 UTC
Created attachment 128134 [details]
Image with resolution stored in pixels/cm

Sorry, the last image had resolution stored in ppi, this one is in
ppcm. But Krita still displays ppi.
Comment 5 Halla Rempt 2020-05-04 12:55:41 UTC
Ah, that explains.
Comment 6 Bug Janitor Service 2022-11-29 01:46:29 UTC
A possibly relevant merge request was started @ https://invent.kde.org/graphics/krita/-/merge_requests/1662
Comment 7 amyspark 2022-11-29 15:36:02 UTC
Git commit 08e3e2356a055b1f3e9da583a395226bdf1249f0 by L. E. Segovia.
Committed on 29/11/2022 at 15:35.
Pushed by lsegovia into branch 'krita/5.1'.

tiff: Implement detection of resolution unit
Part-of: <https://invent.kde.org/graphics/krita/-/merge_requests/1662>
(cherry picked from commit c8d869554b31175b2fe368383955b3a97964e85b)

M  +4    -0    plugins/impex/tiff/kis_tiff_export.cc
M  +20   -5    plugins/impex/tiff/kis_tiff_import.cc

https://invent.kde.org/graphics/krita/commit/08e3e2356a055b1f3e9da583a395226bdf1249f0