浏览代码

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.
Lucas CHOLLET 1 年之前
父节点
当前提交
284e785053
共有 2 个文件被更改,包括 3 次插入1 次删除
  1. 2 1
      Userland/Libraries/LibGfx/ImageFormats/TIFFLoader.cpp
  2. 1 0
      Userland/Libraries/LibGfx/TIFFGenerator.py

+ 2 - 1
Userland/Libraries/LibGfx/ImageFormats/TIFFLoader.cpp

@@ -354,7 +354,8 @@ private:
             TRY(loop_over_pixels(move(decode_lzw_strip)));
             TRY(loop_over_pixels(move(decode_lzw_strip)));
             break;
             break;
         }
         }
-        case Compression::AdobeDeflate: {
+        case Compression::AdobeDeflate:
+        case Compression::PixarDeflate: {
             // This is an extension from the Technical Notes from 2002:
             // 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
             // https://web.archive.org/web/20160305055905/http://partners.adobe.com/public/developer/en/tiff/TIFFphotoshop.pdf
             ByteBuffer decoded_bytes {};
             ByteBuffer decoded_bytes {};

+ 1 - 0
Userland/Libraries/LibGfx/TIFFGenerator.py

@@ -58,6 +58,7 @@ class Compression(EnumWithExportName):
     JPEG = 6
     JPEG = 6
     AdobeDeflate = 8
     AdobeDeflate = 8
     PackBits = 32773
     PackBits = 32773
+    PixarDeflate = 32946  # This is the old (and deprecated) code for AdobeDeflate
 
 
 
 
 class PhotometricInterpretation(EnumWithExportName):
 class PhotometricInterpretation(EnumWithExportName):