Bug 488024 - Stray popup when opening TIF files
Summary: Stray popup when opening TIF files
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: File formats (show other bugs)
Version: 5.2.2
Platform: Mint (Ubuntu based) Linux
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-06-04 15:54 UTC by kritabugs@mlhk.org
Modified: 2024-06-05 17:33 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Screen capture of TIFF open popup dialogue (23.84 KB, image/png)
2024-06-04 15:54 UTC, kritabugs@mlhk.org
Details
attachment-3041473-0.html (1.98 KB, text/html)
2024-06-04 17:53 UTC, Dmitry Kazakov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description kritabugs@mlhk.org 2024-06-04 15:54:21 UTC
Created attachment 170136 [details]
Screen capture of TIFF open popup dialogue

A new "feature"  appeared since several 5.x.x Krita releases  when opening TIFF files.

An annoying popup must be clicked away for EACH and EVERY TIFF file that is getting opened:

Its reads (see also screen capture):
=================
TIFF image with PSD data — Krita

The TIFF image contains valid PSD data embedded
Would you like to use PSD data instead of normal
TIFF data?

Buttons: NO / YES
=================

I have no idea what "PSD data" is actually supposed to mean, I suppose that "PSD" might stand for an Adobe Photoshop format. I could find nothing regarding this in the Krita documentation.

This message appears regardless of the actual content of the TIFF file. I tried stripping the TIFF tags to the barest minimum (nothing much beyond compression type, X and Y pixels), yet this message always comes on.

This dialogue does not appear to add anything of value to Krita, it makes no apparent difference whether I click "YES" or "NO".

I therefore consider it to be a bug, or at the very least "negative improvement".

I scan a lot of old documents, using several different scanners, libtiff tools, as well as home written tools to automatically crop, denoise and OCR. I can still need to edit several dozen pages with Krita to get rid of residual blemishes (torn pages, folds, rotate, manual cropping), and sometimes I can end working on more than 100 page files on a given day. I will often open 15-20 files at a time from the command line.

Switching to another format such as PNG is not a viable option, unless I redesign a lot of the stuff I wrote, or put up with additional conversion steps. TIFF is still the most efficient for the type of documents I work on.

This dialogue is therefore extremely annoying and time wasting.

I wish this mis-feature be either removed, redesigned (i.e., to be only active if there is actually something to be gained from the alleged "PSD information"), or at the very least documented?

Thanks,
Comment 1 Freya Lupen 2024-06-04 16:39:25 UTC
This dialog is supposed to show only if Photoshop data is found in the TIFF. I can confirm it's mistakenly shown when loading a regular TIFF saved from Krita on 5.3.0-prealpha.

Note: This was introduced in commit 89ccdfb4.
Comment 2 kritabugs@mlhk.org 2024-06-04 17:32:41 UTC
Thanks Freya for the confirmation.

Here is a tiffutil tifdump output from a simple bitmap Group4 coded file that triggers the popup window:

Magic: 0x4949 <little-endian> Version: 0x2a <ClassicTIFF>
Directory 0: offset 25952 (0x6560) next 0 (0)
ImageWidth (256) SHORT (3) 1<5052>
ImageLength (257) SHORT (3) 1<6602>
BitsPerSample (258) SHORT (3) 1<1>
Compression (259) SHORT (3) 1<4>
Photometric (262) SHORT (3) 1<1>
StripOffsets (273) LONG (4) 1<8>
Orientation (274) SHORT (3) 1<1>
SamplesPerPixel (277) SHORT (3) 1<1>
RowsPerStrip (278) SHORT (3) 1<6602>
StripByteCounts (279) LONG (4) 1<25184>
XResolution (282) RATIONAL (5) 1<600>
YResolution (283) RATIONAL (5) 1<600>
PlanarConfig (284) SHORT (3) 1<1>
ResolutionUnit (296) SHORT (3) 1<2>

I see nothing fancy at all here, just 100% vanilla TIFF tags. This will also happen on grayscale or RGB images, with or without compression.
Comment 3 Dmitry Kazakov 2024-06-04 17:53:19 UTC
Created attachment 170144 [details]
attachment-3041473-0.html

Is it a regression/release blocker?

---
Dmitry Kazakov

вт, 4 июн. 2024 г., 19:32 <kritabugs@mlhk.org>:

> https://bugs.kde.org/show_bug.cgi?id=488024
>
> --- Comment #2 from kritabugs@mlhk.org <kritabugs@mlhk.org> ---
> Thanks Freya for the confirmation.
>
> Here is a tiffutil tifdump output from a simple bitmap Group4 coded file
> that
> triggers the popup window:
>
> Magic: 0x4949 <little-endian> Version: 0x2a <ClassicTIFF>
> Directory 0: offset 25952 (0x6560) next 0 (0)
> ImageWidth (256) SHORT (3) 1<5052>
> ImageLength (257) SHORT (3) 1<6602>
> BitsPerSample (258) SHORT (3) 1<1>
> Compression (259) SHORT (3) 1<4>
> Photometric (262) SHORT (3) 1<1>
> StripOffsets (273) LONG (4) 1<8>
> Orientation (274) SHORT (3) 1<1>
> SamplesPerPixel (277) SHORT (3) 1<1>
> RowsPerStrip (278) SHORT (3) 1<6602>
> StripByteCounts (279) LONG (4) 1<25184>
> XResolution (282) RATIONAL (5) 1<600>
> YResolution (283) RATIONAL (5) 1<600>
> PlanarConfig (284) SHORT (3) 1<1>
> ResolutionUnit (296) SHORT (3) 1<2>
>
> I see nothing fancy at all here, just 100% vanilla TIFF tags. This will
> also
> happen on grayscale or RGB images, with or without compression.
>
> --
> You are receiving this mail because:
> You are watching the assignee of the bug.
Comment 4 Freya Lupen 2024-06-05 17:32:08 UTC
Git commit 8901d5460d897ee7c2311038642e082b13aa6b47 by Freya Lupen.
Committed on 05/06/2024 at 17:29.
Pushed by freyalupen into branch 'master'.

Ask to use PSD data in TIFF only if any was found

Before, it would always ask, claiming valid PSD data was found
even when it was not.

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

https://invent.kde.org/graphics/krita/-/commit/8901d5460d897ee7c2311038642e082b13aa6b47
Comment 5 Freya Lupen 2024-06-05 17:33:04 UTC
Git commit 9e435e22f0b5e61ea81ff4bd10355556f5041f73 by Freya Lupen.
Committed on 05/06/2024 at 17:33.
Pushed by freyalupen into branch 'krita/5.2'.

Ask to use PSD data in TIFF only if any was found

Before, it would always ask, claiming valid PSD data was found
even when it was not.


(cherry picked from commit 8901d5460d897ee7c2311038642e082b13aa6b47)

Co-authored-by: Freya Lupen <penguinflyer2222@gmail.com>

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

https://invent.kde.org/graphics/krita/-/commit/9e435e22f0b5e61ea81ff4bd10355556f5041f73