TIFF/BigTIFF validation, possible bad/extra/missing warnings?

Started by fiendish, July 15, 2021, 02:39:11 PM

Previous topic - Next topic

fiendish

macOS 10.15.7
exiftool 12.29

I have two Aperio SVS files (TIFFs that, despite admonition, mix tiled and stripped IFDs in one file) that I'm running through exiftool -validate.

One (very large 1.3 GB) I found here: https://slides.cldavis.org/slides/slideupload/NEVPC2020_8.svs
The other (small 1.85 MB) I found here: http://openslide.cs.cmu.edu/download/openslide-testdata/Aperio/CMU-1-Small-Region.svs

The large one is BigTIFF, the small one is normal TIFF.

The normal TIFF gives some unexpected validation warnings:

Missing required TIFF IFD0 tags StripOffsets, StripByteCounts, RowsPerStrip. (IFD0 is tiled, not stripped, and the equivalent Tile tags are present)
Invalid Compression JPEG. (?)
PreviewImage isn't numeric in addition. (?)
Missing required TIFF IFD0 tags XResolution, YResolution. (I can't tell from specs if this should actually be required in a tiled IFD0)

that the BigTIFF does not give despite having basically the same tags except for Photometric Interpretation being YCbCr instead of RGB


exiftool -validate -warning -error -a -FILE:all -IFD0:all -G1 CMU-1-Small-Region.svs.tiff
[ExifTool]      Validate                        : 11 Warnings (4 minor)
[ExifTool]      Warning                         : [minor] Non-standard IFD0 tag 0x80e5 ImageDepth
[ExifTool]      Warning                         : [minor] Non-standard IFD1 tag 0x80e5 ImageDepth
[ExifTool]      Warning                         : [minor] Non-standard IFD2 tag 0x80e5 ImageDepth
[ExifTool]      Warning                         : [minor] Non-standard IFD3 tag 0x80e5 ImageDepth
[ExifTool]      Warning                         : RawConv PreviewImage: Argument "17622 8613 2970 5684 3441 2483 2415 2309 2306 2278 2120 ..." isn't numeric in addition (+)
[ExifTool]      Warning                         : Invalid value for IFD0 tag 0x0103 Compression
[ExifTool]      Warning                         : Missing required TIFF IFD0 tag 0x0111 StripOffsets
[ExifTool]      Warning                         : Missing required TIFF IFD0 tag 0x0116 RowsPerStrip
[ExifTool]      Warning                         : Missing required TIFF IFD0 tag 0x0117 StripByteCounts
[ExifTool]      Warning                         : Missing required TIFF IFD0 tag 0x011a XResolution
[ExifTool]      Warning                         : Missing required TIFF IFD0 tag 0x011b YResolution
[System]        File Name                       : CMU-1-Small-Region.svs.tiff
[System]        Directory                       : .
[System]        File Size                       : 1894 KiB
[System]        File Modification Date/Time     : 2021:07:15 10:15:15-06:00
[System]        File Access Date/Time           : 2021:07:15 10:15:17-06:00
[System]        File Inode Change Date/Time     : 2021:07:15 10:15:15-06:00
[System]        File Permissions                : -rw-r--r--
[File]          File Type                       : TIFF
[File]          File Type Extension             : tif
[File]          MIME Type                       : image/tiff
[File]          Exif Byte Order                 : Little-endian (Intel, II)
[IFD0]          Subfile Type                    : Full-resolution image
[IFD0]          Image Width                     : 2220
[IFD0]          Image Height                    : 2967
[IFD0]          Bits Per Sample                 : 8 8 8
[IFD0]          Compression                     : JPEG
[IFD0]          Photometric Interpretation      : RGB
[IFD0]          Image Description               : Aperio Image Library v11.2.1 ..46000x32914 [42673,5576 2220x2967] (240x240) JPEG/RGB Q=30;Aperio Image Library v10.0.51..46920x33014 [0,100 46000x32914] (256x256) JPEG/RGB Q=30|AppMag = 20|StripeWidth = 2040|ScanScope ID = CPAPERIOCS|Filename = CMU-1|Date = 12/29/09|Time = 09:59:15|User = b414003d-95c6-48b0-9369-8010ed517ba7|Parmset = USM Filter|MPP = 0.4990|Left = 25.691574|Top = 23.449873|LineCameraSkew = -0.000424|LineAreaXOffset = 0.019265|LineAreaYOffset = -0.000313|Focus Offset = 0.000000|ImageID = 1004486|OriginalWidth = 46920|Originalheight = 33014|Filtered = 5|OriginalWidth = 46000|OriginalHeight = 32914
[IFD0]          Samples Per Pixel               : 3
[IFD0]          Planar Configuration            : Chunky
[IFD0]          Tile Width                      : 240
[IFD0]          Tile Length                     : 240
[IFD0]          Tile Offsets                    : (Binary data 911 bytes, use -b option to extract)
[IFD0]          Tile Byte Counts                : (Binary data 700 bytes, use -b option to extract)
[IFD0]          JPEG Tables                     : (Binary data 289 bytes, use -b option to extract)
[IFD0]          Y Cb Cr Sub Sampling            : YCbCr4:2:0 (2 2)
[IFD0]          Image Depth                     : 1



exiftool -validate -warning -error -a -FILE:all -IFD0:all -G1 NEVPC2020_8.svs
[ExifTool]      Validate                        : OK
[System]        File Name                       : NEVPC2020_8.svs
[System]        Directory                       : .
[System]        File Size                       : 1286 MiB
[System]        File Modification Date/Time     : 2021:07:15 09:27:45-06:00
[System]        File Access Date/Time           : 2021:07:15 09:28:02-06:00
[System]        File Inode Change Date/Time     : 2021:07:15 09:27:45-06:00
[System]        File Permissions                : -rw-r--r--
[File]          File Type                       : BTF
[File]          File Type Extension             : btf
[File]          MIME Type                       : image/x-tiff-big
[IFD0]          Subfile Type                    : Full-resolution image
[IFD0]          Image Width                     : 140048
[IFD0]          Image Height                    : 77983
[IFD0]          Bits Per Sample                 : 8 8 8
[IFD0]          Compression                     : JPEG
[IFD0]          Photometric Interpretation      : YCbCr
[IFD0]          Image Description               : Aperio Leica Biosystems GT450 v1.0.0 .140048x77983 [0,0,140048x77983] (256x256) JPEG/YCC Q=91|AppMag = 40|Date = 03/15/2021|Exposure Scale = 0.000001|Exposure Time = 7|Filtered = 3|Focus Offset = 0.000000|Gamma = 2.2|Left = 15.809649467468|MPP = 0.263246|Rack = 1|ScanScope ID = SS12074|Slide = 1|StripeWidth = 4096|Time = 14:28:07|Time Zone = GMT-0400|Top = 20.845998764038
[IFD0]          Samples Per Pixel               : 3
[IFD0]          Planar Configuration            : Chunky
[IFD0]          Tile Width                      : 256
[IFD0]          Tile Length                     : 256
[IFD0]          Tile Offsets                    : (Binary data 1690739 bytes, use -b option to extract)
[IFD0]          Tile Byte Counts                : (Binary data 869908 bytes, use -b option to extract)
[IFD0]          Image Depth                     : 1


It seems like validate on TIFF does not understand a tiled IFD0, and then BigTIFF maybe just doesn't do checks? I notice also that the BigTIFF doesn't report byte order but it's in there. (html dumps attached)

Phil Harvey

It will take me some time before I have a chance to look at this in detail, but I will respond after I have done this.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).