Bug 489596 - TIF file format save/export creates broken/empty images (5.2.3)
Summary: TIF file format save/export creates broken/empty images (5.2.3)
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: File formats (show other bugs)
Version: git master (please specify the git hash!)
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Dmitry Kazakov
URL:
Keywords: regression, release_blocker, triaged
Depends on:
Blocks:
 
Reported: 2024-07-02 11:06 UTC by Crocobutt
Modified: 2024-07-31 10:58 UTC (History)
4 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Crocobutt 2024-07-02 11:06:38 UTC
SUMMARY
Using Save As or Export option to save a TIF file creates a broken/garbage file.

STEPS TO REPRODUCE
1. Create any new document.
2. Put a line down, anything, so long as it's observable.
3. Use either Save As or Export option in File menu.
4. Select TIF file format for output. (any settings - they don't have effect)

OBSERVED RESULT
Created TIF file is an empty nothing.

EXPECTED RESULT
Lossless TIF format image of what you put on canvas.

SOFTWARE/OS VERSIONS
Windows: 10
Krita: 5.2.3 (git 68d178c)
Comment 1 vanyossi 2024-07-02 14:21:04 UTC
I am not observing this on macOS build, I'll need to test this on windows to fully test this report.
Comment 2 Crocobutt 2024-07-02 14:50:24 UTC
(In reply to vanyossi from comment #1)
> I am not observing this on macOS build, I'll need to test this on windows to
> fully test this report.

Last stable 5.2.2 version (and all previous) worked just fine.
Comment 3 vanyossi 2024-07-02 15:13:02 UTC
This seems to be an error only on windows?. Saving a TIFF file with LZW or no algorithm compression saves fine. however using deflate and pixarlog (which uses deflate internally) generates the following messages

"Compression algorithm does not support random access"

multiple times and suggest the following
"TIFFWriteDirectorySec: Creating TIFF with legacy Deflate codec identifier, COMPRESSION_ADOBE_DEFLATE is more widely supported"

The later message shows on macOS as well, however the save operation produces a working TIF
Comment 4 Crocobutt 2024-07-02 15:55:13 UTC
(In reply to vanyossi from comment #3)
> This seems to be an error only on windows?. Saving a TIFF file with LZW or
> no algorithm compression saves fine. however using deflate and pixarlog
> (which uses deflate internally) generates the following messages
> 
> "Compression algorithm does not support random access"
> 
> multiple times and suggest the following
> "TIFFWriteDirectorySec: Creating TIFF with legacy Deflate codec identifier,
> COMPRESSION_ADOBE_DEFLATE is more widely supported"
> 
> The later message shows on macOS as well, however the save operation
> produces a working TIF

Oh, so the options were relevant!
Yes, I have forever been using Deflate option in compression.

Thanks for looking into it!
Comment 5 Freya Lupen 2024-07-11 13:58:06 UTC
The deprecation warning about legacy Deflate is fixed on 5.3-branch, and unrelated.

After the many "Compression algorithm does not support random access" errors are two more:

> [filename]: Deflate compression support is not configured 
> TIFFFillStrip: Invalid strip byte count 0, strip 0 

My guess is that after the dependency build changes, on Windows TIFF is no longer being compiled with ZLIB, which is required for Deflate.
Comment 6 Halla Rempt 2024-07-27 07:58:56 UTC
I agree, that probably is the reason.
Comment 7 Dmitry Kazakov 2024-07-31 10:58:32 UTC
The bug should be fixed with this commit:
https://invent.kde.org/dkazakov/krita-deps-management/-/commit/c1049ffb1b077b2b3af47efb82d7fb3d29191dea