I have a perl script that splits multi-page tiff files using IM convert, and every once in a while, I'll run into a tiff containing an orientation tag with a bad value*. IM does separate the page from the original tiff, but gives a return code of '1'
Is this proper behavior? I'd expect a warning in this case. The resulting tiffs are usable, but I can't rely on checking the return code now to see if the split succeeded.
the convert command i'm using is: convert -define quantum:polarity=min-is-white -compress Group4 -quiet 0511.tif[0] 0511_front.tif
* identify gives me this:
0511.TIF[0] TIFF 1200x554 1200x554+0+0 1-bit Bilevel DirectClass 16.5KB 0.000u 0:00.000
0511.TIF[1] TIFF 1200x558 1200x558+0+0 1-bit Bilevel DirectClass 16.5KB 0.000u 0:00.016
identify: incorrect count for field "Orientation" (2, expecting 1); tag trimmed. `0511.TIF' @ warning/tiff.c/TIFFWarnings/704.
identify: 0511.TIF: unknown field with tag 34696 (0x8788) encountered. `TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/704.
identify: 0511.TIF: unknown field with tag 34698 (0x878a) encountered. `TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/704.
identify: 0511.TIF: Bad value 14984704 for "Orientation" tag. `_TIFFVSetField' @ error/tiff.c/TIFFErrors/494.
identify: incorrect count for field "Orientation" (2, expecting 1); tag trimmed. `0511.TIF' @ warning/tiff.c/TIFFWarnings/704.
identify: 0511.TIF: Bad value 14988008 for "Orientation" tag. `_TIFFVSetField' @ error/tiff.c/TIFFErrors/494.
Platform is winxp/activestate perl 5.8/convert Version: ImageMagick 6.6.3-2 2010-07-27 Q16
Thanks!
TIFF split problem
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: TIFF split problem
There have been some recent bug reports regarding the -orient command and retrieving orientation information. Try checking those bug reports and see if they are relevant to your problem.