In a TIFF, Compression (0x0103, IFD0) tells the decoder how the strips or tiles of pixel data are encoded, and the decoder believes it. In a JPEG it usually describes only the embedded thumbnail in IFD1, since the main image is JPEG by definition. Camera JPEGs normally have no Compression tag in IFD0 at all.
| Value | ExifTool prints | Where you see it |
|---|---|---|
| 1 | Uncompressed | Plain TIFF |
| 5 | LZW | TIFF exports, scanners |
| 6 | JPEG (old-style) | EXIF thumbnails in IFD1 |
| 7 | JPEG | JPEG-compressed TIFF |
| 8 | Adobe Deflate | ZIP option, convert -compress zip |
| 32773 | PackBits | Simple run-length encoding |
ExifTool's full table lists 53 codes, many of them for raw formats (34713 is Nikon NEF Compressed) or fax variants. Code 32946 is the older Deflate value.
The choice matters for file size. One 1200x800 photo saved by Pillow came to 2,880,140 bytes uncompressed, 1,424,644 with LZW and 759,206 with Adobe Deflate. PackBits made it bigger: 2,901,408 bytes. Run-length encoding has nothing to work with in photographic noise.
Changing the value does not recompress
The tag is a label. Rewrite it on a TIFF and the data is decoded with the wrong algorithm. ExifTool catches some cases: -Compression#=1 on an LZW file stopped with "Undersized IFD0 StripByteCounts". It does not catch this one: -Compression=1 without the # is matched against the printed names, landed on CCITT 1D and wrote 2. Pillow then refused to decode the file. Always use # (or -n) when you write numeric codes.
To actually change compression, re-save the image:
convert scan.tif -compress lzw scan_lzw.tif
exiftool -G1 -s -n -Compression scan_lzw.tif[IFD0] Compression : 5The EXIF reader shows Compression, and the editor can write it for JPEG and TIFF. On a TIFF, treat it as read-only unless you are repairing a file whose tag is known to be wrong. The EXIF data guide explains IFD0 and IFD1.