ExifTool Forum

ExifTool => Newbies => Topic started by: Ash on October 02, 2014, 08:30:00 AM

Title: Help with Detecting corrupt tiff files !!!
Post by: Ash on October 02, 2014, 08:30:00 AM
Hi

First time user here, looking for some help.

I have a database with 1000s of tiff files, all of which are Jpeg compression.

However some colleagues of mine have been inserting LZW compression images into these tiff files and now the files are coming up as corrupt on our clients in-house software.

How do I detect tiff files that may have images that are non jpeg compression?

Number of images per tiff vary from 2 to 2000 images,  :-[
There may be a tiff file with 100 images of which 98 are jpeg and 2 are LZW. :'(
Title: Re: Help with Detecting corrupt tiff files !!!
Post by: Hayo Baan on October 02, 2014, 10:24:04 AM
This command will list the compression used by your .tif) files:
exiftool -Compression -ext tif FILES_or_DIRS

The ones with LZW compression will easily be found as the will say LZW for the compression used.

To just get a list of .tif files that are LZW compressed, use the following command:
Mac:
exifTool -q -T -FileName -if '$Compression eq "LZW"' -ext tif FILES_or_DIRS

Windows:
exifTool -q -T -FileName -if "$Compression eq 'LZW'" -ext tif FILES_or_DIRS

Hope this helps,
Hayo