1997.05.30 19:14 "Re: PackBits confusion", by Richard J. Kinch
If you can demonstrate to me that this problem is widespread then perhaps we can add a flag to the library to control the handling of a -128 code and then add an option to tiffcp to use in converting files to a valid format. Freel free to send me changes along this line...
I was worried that the problem was widespread. It appears to come from the bundled TIFF-editing software from my old Logitech hand scanner, and a lot of my historical images contain it, and thus my paranoia. If you haven't heard much about it, it is probably just my "luck" that my stuff is rotted through.
I'm not concerned about it for myself, but for others who might run into it. So if it isn't a common problem, it isn't much of a concern.
The tiffcp option is a nice idea.
I haven't studied the libtiff PackBits decoding thoroughly on this point: does an image that misuses -128 for a repetition cause an error in libtiff (like stray memory reference). When I try to load such images in my Windows 95 compilation, I get program faults. The data byte that was erroneously intended to be the repeated data winds up getting treated by the (correct) libtiff as an opcode, and all bets are off.
So I wonder if libtiff PackBits decoding might not be "defensive" enough.