Skip to content

OpenToonz - An open-source full-featured 2D animation creation software

C

Fix "Lempel-Ziv & Welch encoding" so that the tnz scene can be loaded into other programs

Михалыч864fa321ae26
diff --git a/toonz/sources/image/tif/tiio_tif.cpp b/toonz/sources/image/tif/tiio_tif.cpp
index f8cec502b..1b1d56bc4 100644
--- a/toonz/sources/image/tif/tiio_tif.cpp
+++ b/toonz/sources/image/tif/tiio_tif.cpp
@@ -902,7 +902,7 @@ void TifWriter::open(FILE *file, const TImageInfo &info) {
std::wstring compressionType =
((TEnumProperty *)(m_properties->getProperty("Compression Type")))
->getValue();
- if (compressionType == TNZ_INFO_COMPRESS_LZW)
+ if (compressionType == TNZ_INFO_COMPRESS_LZW || compressionType == TNZ_INFO_COMPRESS_LZW_LEG)
TIFFSetField(m_tiff, TIFFTAG_COMPRESSION, COMPRESSION_LZW);
else if (compressionType == TNZ_INFO_COMPRESS_PACKBITS)
TIFFSetField(m_tiff, TIFFTAG_COMPRESSION, COMPRESSION_PACKBITS);
diff --git a/toonz/sources/image/tif/tiio_tif.h b/toonz/sources/image/tif/tiio_tif.h
index 27842361d..a777441a0 100644
--- a/toonz/sources/image/tif/tiio_tif.h
+++ b/toonz/sources/image/tif/tiio_tif.h
@@ -14,7 +14,8 @@
#define TNZ_INFO_COMPRESS_CCITTRLE L"CCITT modified Huffman Run-length encoding"
#define TNZ_INFO_COMPRESS_CCITTFAX3 L"CCITT Group 3 fax encoding"
#define TNZ_INFO_COMPRESS_CCITTFAX4 L"CCITT Group 4 fax encoding"
-#define TNZ_INFO_COMPRESS_LZW L"Lempel-Ziv & Welch encoding"
+#define TNZ_INFO_COMPRESS_LZW L"Lempel-Ziv and Welch encoding"
+#define TNZ_INFO_COMPRESS_LZW_LEG L"Lempel-Ziv & Welch encoding"
#define TNZ_INFO_COMPRESS_PACKBITS L"Macintosh Run-length encoding"
#define TNZ_INFO_COMPRESS_THUNDERSCAN L"ThunderScan Run-length encoding"
#define TNZ_INFO_COMPRESS_RLE L"Run-length compression"