Skip to content

Commit dafaa8d

Browse files
authored
SG-34355 - Fix wrong TIFF compression being displayed (#1054)
### **[SG-34355](https://jira.autodesk.com/browse/SG-34355): RV is not returning proper compression information of TIFF files anymore** ### Summarize your change. Made sure the compression variable is the same type as the one used to store the compression type (changed to unsigned short from unsigned int) so it is consistent with the function it is used with. Added TIFFTAG_COMPRESSION to the list of tags that we handle manually. ### Describe the reason for the change. Previously, the TIFFTAG_COMPRESSION was being overwritten every time we call readAllTags() causing the compression type to be a numerical value instead of the actual compression name. ### Describe what you have tested and on which operating system. This fix was tested on macOS with Tiff sequences compressed using LZW and RLE. ### If possible, provide screenshots. Under TIFF/Compression, the correct compression type is displayed instead of a number. <img width="1024" height="663" alt="Screenshot 2026-01-09 at 12 02 45 PM" src="https://github.com/user-attachments/assets/44185c22-0e50-4c18-8bc0-d85df540a086" /> Signed-off-by: chenl1 <ling.jie.chen@autodesk.com>
1 parent 8c9d69c commit dafaa8d

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/lib/image/IOtiff/IOtiff.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,8 @@ namespace TwkFB
337337
if (fip->field_tag != TIFFTAG_ICCPROFILE && // exclude tags we handle seperately
338338
fip->field_tag != EXIFTAG_COLORSPACE &&
339339

340+
fip->field_tag != TIFFTAG_COMPRESSION && // prevent the overwriting of the compression type with numerical value
341+
340342
fip->field_tag != TIFFTAG_XRESOLUTION && fip->field_tag != TIFFTAG_YRESOLUTION && fip->field_tag != TIFFTAG_SOFTWARE
341343
&& fip->field_tag != EXIFTAG_PIXELXDIMENSION && fip->field_tag != EXIFTAG_PIXELYDIMENSION
342344
&& fip->field_tag != TIFFTAG_RESOLUTIONUNIT && fip->field_tag != TIFFTAG_PLANARCONFIG &&
@@ -1543,7 +1545,7 @@ namespace TwkFB
15431545

15441546
char* software = NULL;
15451547
bool isMaya = false;
1546-
unsigned int compression;
1548+
unsigned short compression;
15471549

15481550
if (TIFFGetField(tif, TIFFTAG_COMPRESSION, &compression))
15491551
{

0 commit comments

Comments
 (0)