How to identify a corrupted TIFF image


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting How to identify a corrupted TIFF image
# 1  
Old 04-01-2010
How to identify a corrupted TIFF image

Hi everyone! Here's my first thread...

I have to recognize if a TIFF image is corrupted or not.
I've always used
Code:
file -b

to identify file type, but I've experienced that sometimes it returns "TIFF image data, little endian" even if the image is truncated or something.
Do you know another trick to check it?

Thanks!
# 2  
Old 04-01-2010
the file command looks the the magic (first 4 bytes) of the file. Not the whole file.

In order to completely verify a tiff file you have to open it with a drawing/media program that handles these files. TIFF 6.0 is the current version, I think, and it does not specify a checksum, so you cannot calculate one to verify the file independently.

Plus. TIFF uses LZW compression, therefore, opening it to verify the data means using LZW decompresion on the data segment of the file.
# 3  
Old 04-02-2010
So as I understand, there is no way to check TIFF corruption with a bash command...
# 4  
Old 04-02-2010
Nothing native to UNIX will check the file - you need special graphics tools.

If you want a tool - if libtiff is already on your box:
Code:
tiffinfo -D myfile.tif

will verify a file

if not you can get libtiff and the toolset here:
LibTIFF - TIFF Library and Utilities
# 5  
Old 04-21-2010
And what about the trick explained here?
# 6  
Old 04-21-2010
That "trick" is meant for files that are corrupted in the file system, eg. missing blocks due to power loss. An incomplete TIFF file is still valid for the file system, as it doesn't care about the content.
# 7  
Old 04-21-2010
Ok, thank you for all your replies!
Login or Register to Ask a Question

Previous Thread | Next Thread

5 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Identify function image magick problem - perl

Hi, I got some error when I try to write content from file store into array then for each word that separate by space use identify function to display image information.here is my code #!/usr/bin/perl -w open(FILE,'transfer_file_perl.txt') or die "$!"; my $line = <FILE>;#because it is one... (2 Replies)
Discussion started by: guidely
2 Replies

2. UNIX for Advanced & Expert Users

Create an Ignite image on tape from Online IgniteUX image

Hi, (HP-UX 11.11) I need to create a tape image of an igniteUX image created on our igniteUX server. That is to say. I have a "Online" image of the igniteUX of the targeted system but I now need to copy it to a useable TAPE (igniteUX) image so i can build an other server from it that is not... (3 Replies)
Discussion started by: Andrek
3 Replies

3. UNIX for Dummies Questions & Answers

View TIFF images from UNIX

I am new to unix. I want to know if there is any tool or plugin available for AIX unix system through which a user can see the TIFF images. Below are the details: Our application runs on AIX Unix box. The users log in to the application through telnet clients running on Windows 2000/XP systems.... (1 Reply)
Discussion started by: erpankajgupta
1 Replies

4. UNIX for Dummies Questions & Answers

Automatized .ps into .tiff conversion

Hi everybody, I have more tan 300 images postscripts (.ps) in my UNIX enviroment. I would like to have all these images in a single Power Point presentation (windows enviroment). Anybody has a clue how to convert all those .ps file into a format recognized by Power Point in an automatic... (1 Reply)
Discussion started by: cordobapab
1 Replies

5. UNIX for Dummies Questions & Answers

Printing .TIFF files

Please forgive my ignorance...but I was hoping a Unix guru could help me with sending .TIFF files to an HP color laserjet 8550. I understand that .TIFF is not one of the languages used in this case, but I understood that there might be some commands that could be added to the queue to allow it to... (3 Replies)
Discussion started by: elbryan
3 Replies
Login or Register to Ask a Question