TIFF and LibTiff Mail List Archive


2002.08.22 18:11 "Recover tiff file", by Agneta Johnér
2002.08.22 21:18 "Re: Recover tiff file", by Chris Cox
2002.08.23 18:02 "Re: Recover tiff file", by Agneta Johner
2002.08.24 12:00 "Re: Recover tiff file", by Phillip Crews
2002.08.24 12:12 "Re: Recover tiff file", by Agneta Johner
2002.08.29 18:00 "Re: Recover tiff file", by Phillip Crews
2002.08.29 19:00 "Re: Recover tiff file", by Agneta Johner

2002.08.29 18:00 "Re: Recover tiff file", by Phillip Crews


The TIFF file may have at some point in the past been transferred in ASCII mode, since the file there now, which I downloaded in Binary mode, also has 0x0d before each 0x0a.

I wrote a utility to strip the extra CRs, but the TIFF tags were still invalid (Bits per sample, for example, was 256, 0, 53248, instead of the usual 8,8,8). This is probably what is causing the error in Photoshop. ThumbsPlus reports the Libtiff error 'Cannot handle different per-sample values for field "BitsPerSample"'.

So, I extracted the raw image data from the TIFF file using ThumbsPlus, then created a TIFF file from the result. I noticed when I did this that the width in the TIFF header (5295) did not match the actual width of the raw data (5368).

I saved & uploaded the result of this extraction to:

Of course, since the TIFF header is munged, the data probably is also, so I doubt if this is the way the image is supposed to look.

Something is definitely happening to your files when being transferred from system to system or when uploading. I cannot read the JPEG file either. The beginning of the file is screwed up. Here's the normal beginning of a JPG file:

 ff d8 ff e0  0 10 4a 46 49 46  0  ......JFIF.

Here's the beginning of your uploaded JPEG file:

 9d ff 9d fd  0 10 4a 46 49 46  0  ......JFIF.

The original TIFF file has a bunch of 0x9d bytes in it as well, at least some of which should definitely be 0xff.

I hope this helps track down your problem.

Kind regards,

Phillip Crews
Cerious Software, Inc.

Hi Phillip!

Thank you for letting me know! It was actually also the wrong file copied there at the time you had a look. My apologizes for the mistake! The correct files are present now, and this time the transfer mode was binery.

Thank you again for letting me know, best regards Agneta

I'm not sure if it happened before you started uploading the file, or if it's happening now, but the file is/was transferred in ASCII mode, which is adding a carriage return (0x0d) before each linefeed (0x0a).


Thanks for taking your time with my problem. The file was ok before it was copied to another location ( and unfortunately the original was removed!). When trying to open it in Photoshop I got the message "Can't open this tiff document because it contains to many bits". I tried the pmview tool ( found at Peter Nielsen: thanks for the tip! ) and got the message"Unsupported data: Bits per sample =0"

I checked the tag info using a tool called Tagsviewer ( found at and the info looked ok. Anybody interested can find the file here if you want to have a look:

It's unfortunately pretty big ( 55 Mb), a smaller jpeg version is also present....

>>> Agneta John�r


> Agneta John�r
> John�r Bildbyr� AB
> John�r Interactive
> �s�gatan 144

Editor's note: This mail was not originally archived, and has been reconstructed from quotes.