Bug 459840 - Krita miss-aligns the layers when open multilayer tiff file
Summary: Krita miss-aligns the layers when open multilayer tiff file
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: File formats (show other bugs)
Version: 5.1.1
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: amyspark
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-09-29 23:54 UTC by LL
Modified: 2022-10-04 00:57 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
the original tiff (168.68 KB, image/tiff)
2022-09-29 23:54 UTC, LL
Details
the expected result (46.00 KB, image/jpeg)
2022-09-29 23:55 UTC, LL
Details
the krita's wrong result (41.52 KB, image/jpeg)
2022-09-29 23:56 UTC, LL
Details

Note You need to log in before you can comment on or make changes to this bug.
Description LL 2022-09-29 23:54:32 UTC
Created attachment 152510 [details]
the original tiff

SUMMARY
When open a tiff file contain layers that have different sizes, it miss-aligned the layers: it does not respect the layer position instead it always put layers from (0,0)


STEPS TO REPRODUCE
1.  open given tiff file in krita compare with the result from gimp or imagemagick (`convert test-size.tiff -flatten test-size.im.jpg`)

OBSERVED RESULT
The `test` text is misplaced.

EXPECTED RESULT
The `test` text should be placed as the test-size.im.jpg

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 LL 2022-09-29 23:55:37 UTC
Created attachment 152511 [details]
the expected result
Comment 2 LL 2022-09-29 23:56:48 UTC
Created attachment 152512 [details]
the krita's wrong result
Comment 3 Halla Rempt 2022-09-30 07:43:35 UTC
Amyspark, can you take a look?
Comment 4 amyspark 2022-10-01 00:09:48 UTC
Thanks for the sample. I had noticed that Krita did not support TIFF layer positioning, so it'll be an interesting fix to make.
Comment 5 amyspark 2022-10-04 00:56:41 UTC
Git commit 96ee473d4e0a5325a25caa3275773138cc464054 by L. E. Segovia.
Committed on 04/10/2022 at 00:55.
Pushed by lsegovia into branch 'master'.

TIFF: support sub IFD offsets

M  +15   -0    plugins/impex/tiff/kis_tiff_import.cc

https://invent.kde.org/graphics/krita/commit/96ee473d4e0a5325a25caa3275773138cc464054
Comment 6 amyspark 2022-10-04 00:57:15 UTC
Git commit e1d030ca8b638931a6f15ab5fcd92544e06c8d6a by L. E. Segovia.
Committed on 04/10/2022 at 00:56.
Pushed by lsegovia into branch 'krita/5.1'.

TIFF: support sub IFD offsets
(cherry picked from commit 96ee473d4e0a5325a25caa3275773138cc464054)

M  +15   -0    plugins/impex/tiff/kis_tiff_import.cc

https://invent.kde.org/graphics/krita/commit/e1d030ca8b638931a6f15ab5fcd92544e06c8d6a