summaryrefslogtreecommitdiff
blob: 85f41ea190934201367b86bf57e3bc3e90f1db65 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
tiff with enabled old-jpeg support. Do not forgive recompile jpeg with patch
(jdhuff_add.c) from tiff.

I though this helps me to read M$ tiff files, but I was wrong. Even after
patching I receive the following error:

unknown field with tag 37679 (0x932f) encountered. `TIFFReadDirectory'.
unknown field with tag 37680 (0x9330) encountered. `TIFFReadDirectory'.
unknown field with tag 37681 (0x9331) encountered. `TIFFReadDirectory'.

Well. Just found some other information, that may be of interest for somebody
reading this README file.

From Ubuntu Bugzilla:


Re: crash in tiff loader from Michael R. Head at 2006-09-21 00:00:59 UTC

My brother emails me tiffs of magazine articles from work generated by the
scanning system they have in place there. They always have this problem. He's
not very tech-savvy, so he may not be able to configure the system to generate
proper tiffs.

Anyway, I've gone through the trouble of compiling libtiff with the "old jpeg"
support after patching and recompiling libjpeg. After doing this, I still can't
view the file:

burner@firefighter:/tmp$ /tmp/jpg/bin/tiffinfo ~/Desktop/WELL\ LET\ ME.tif
TIFFReadDirectory: Warning, /home/burner/Desktop/WELL LET ME.tif: unknown field with tag 37679 (0x932f) encountered.
TIFFReadDirectory: Warning, /home/burner/Desktop/WELL LET ME.tif: unknown field with tag 37680 (0x9330) encountered.
TIFFReadDirectory: Warning, /home/burner/Desktop/WELL LET ME.tif: unknown field with tag 37681 (0x9331) encountered.
/home/burner/Desktop/WELL LET ME.tif: Invalid YCbCr subsampling.
TIFFReadDirectory: /home/burner/Desktop/WELL LET ME.tif: cannot handle zero strip size.

As you can see, the last 3 unknown fields are present, but I've managed to get
libtiff to understand the takes 513 and 514. Sadly, I still can't get the data
out.

I've collected information on this from the following links (for those that may
find this bug report in the future):
http://bugzilla.remotesensing.org/show_bug.cgi?id=156
http://www.awaresystems.be/imaging/tiff/tifftags/jpeginterchangeformat.html
http://www.remotesensing.org/libtiff/TIFFTechNote2.html

I've gone so far as to run Windows' own tiff viewer, and that still couldn't
extract the image data.

End result: if you get your hands on one of these "old style jpeg in tiff"
files, you're pretty much out of luck. You'll have to negotiate with the file
supplier to provide it in a different format.


Re: crash in tiff loader from Michael R. Head at 2006-09-22 06:53:28 UTC

OK, maybe you won't be out of luck. After reading Pete Savage's blog post about
recovering data, I was able to extract the jpeg living inside my tiff and
finally view the image as intended. Others may find the "foremost" program
helpful: https://launchpad.net/distros/ubuntu/+source/foremost

foremost was able to discover 2 jpegs (one thumbnail as well as the original
scan) and an OLE document inside the evil TIFF, and it extracted them into
their own files.  Just run it like so: "foremost evil.tiff" and it'll put all
the files it finds underneath and "output" directory.