From 284e7850532ea922cfe5796e055f5b970dfbfb4b Mon Sep 17 00:00:00 2001 From: Lucas CHOLLET Date: Tue, 16 Jan 2024 00:01:34 -0500 Subject: [PATCH] LibGfx/TIFF: Accept the PixarDeflate compression tag I would have liked to avoid adding a deprecated tag but this is the one currently in use in Krita. --- Userland/Libraries/LibGfx/ImageFormats/TIFFLoader.cpp | 3 ++- Userland/Libraries/LibGfx/TIFFGenerator.py | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Userland/Libraries/LibGfx/ImageFormats/TIFFLoader.cpp b/Userland/Libraries/LibGfx/ImageFormats/TIFFLoader.cpp index 9efe784d19..f6b60ddd51 100644 --- a/Userland/Libraries/LibGfx/ImageFormats/TIFFLoader.cpp +++ b/Userland/Libraries/LibGfx/ImageFormats/TIFFLoader.cpp @@ -354,7 +354,8 @@ private: TRY(loop_over_pixels(move(decode_lzw_strip))); break; } - case Compression::AdobeDeflate: { + case Compression::AdobeDeflate: + case Compression::PixarDeflate: { // This is an extension from the Technical Notes from 2002: // https://web.archive.org/web/20160305055905/http://partners.adobe.com/public/developer/en/tiff/TIFFphotoshop.pdf ByteBuffer decoded_bytes {}; diff --git a/Userland/Libraries/LibGfx/TIFFGenerator.py b/Userland/Libraries/LibGfx/TIFFGenerator.py index 6dc700cda5..b95d409697 100755 --- a/Userland/Libraries/LibGfx/TIFFGenerator.py +++ b/Userland/Libraries/LibGfx/TIFFGenerator.py @@ -58,6 +58,7 @@ class Compression(EnumWithExportName): JPEG = 6 AdobeDeflate = 8 PackBits = 32773 + PixarDeflate = 32946 # This is the old (and deprecated) code for AdobeDeflate class PhotometricInterpretation(EnumWithExportName):