Image correctly resized but exit code 1
Posted: 2010-12-15T02:56:42-07:00
Hello all,
I am trying to resize tiffs as jpeg with this command:
#convert "mytiff.tif" -resize "200x150" jpeg:"mytiff.tif.thumbnail"
For some tiffs, the picture is correctly resized, but exit code is 1 (instead of 0)
# echo $?
1
output with -verbose:
mytiff.tif TIFF 3543x4724=>8x10 DirectClass 83.9mb 1.440u 0:05
mytiff.tif=>mytiff.tif.thumbnail TIFF 3543x4724=>8x150 DirectClass 344
My IM version: ImageMagick-6.2.4 (imposed by my provider).
Without -resize option:
#convert "mytiff.tif" jpeg:"mytiff.tif.thumbnail"
the exit code is 0
#convert "mytiff.tif" -debug All -resize "200x150" jpeg:"mytiff.tif.thumbnail"
-> nothing is wrong, except:
Exception convert[pid]: tiff.c/TIFFWarnings/280/Exception mytiff.tif: wrong data type 7 for "RichTIFFIPTC"; tag ignored. `TIFFReadDirectory'
Exception convert[pid]: tiff.c/TIFFWarnings/280/Exception mytiff.tif: unknown field with tag 37724 (0x935c) encountered. `TIFFReadDirectory'
but... as i said, some other tiffs are correctly resized AND return 0 as exit code.
This exception message also appear for these 'correct' resized pictures.
Have you an idea about the cause ?
I really need to use this exit code. Here, this one seems to be only a warning. Have you a solution to differentiate 'fatal errors' and 'warnings' with my IM version ?
Thanks
I am trying to resize tiffs as jpeg with this command:
#convert "mytiff.tif" -resize "200x150" jpeg:"mytiff.tif.thumbnail"
For some tiffs, the picture is correctly resized, but exit code is 1 (instead of 0)
# echo $?
1
output with -verbose:
mytiff.tif TIFF 3543x4724=>8x10 DirectClass 83.9mb 1.440u 0:05
mytiff.tif=>mytiff.tif.thumbnail TIFF 3543x4724=>8x150 DirectClass 344
My IM version: ImageMagick-6.2.4 (imposed by my provider).
Without -resize option:
#convert "mytiff.tif" jpeg:"mytiff.tif.thumbnail"
the exit code is 0
#convert "mytiff.tif" -debug All -resize "200x150" jpeg:"mytiff.tif.thumbnail"
-> nothing is wrong, except:
Exception convert[pid]: tiff.c/TIFFWarnings/280/Exception mytiff.tif: wrong data type 7 for "RichTIFFIPTC"; tag ignored. `TIFFReadDirectory'
Exception convert[pid]: tiff.c/TIFFWarnings/280/Exception mytiff.tif: unknown field with tag 37724 (0x935c) encountered. `TIFFReadDirectory'
but... as i said, some other tiffs are correctly resized AND return 0 as exit code.
This exception message also appear for these 'correct' resized pictures.
Have you an idea about the cause ?
I really need to use this exit code. Here, this one seems to be only a warning. Have you a solution to differentiate 'fatal errors' and 'warnings' with my IM version ?
Thanks