Page 1 of 1

possible miff/mpc bug in IM 6.4.7-3

Posted: 2008-12-08T18:44:51-07:00
by fmw42
IM 6.4.7-3 Q16 Mac OSX Tiger

I don't know if this is a bug or problem with this particular image. Here is the part of my script that seems to have trouble when reading to mpc or miff, but works fine reading to png.

Here is the file:
Image

identify -verbose mandril.jpg

All verbose info looks OK to me.



Here is the code:

#!/bin/bash

infile="mandril.jpg"

dir="." # suggestions are dir="." or dir="/tmp"

tmpA1="$dir/scatter_A_$$.mpc"
tmpA2="$dir/scatter_A_$$.cache"
#tmpA1="$dir/scatter_A_$$.miff"
#tmpA1="$dir/scatter_A_$$.png"
trap "rm -f $tmpA1 $tmpA2; exit 0" 0
trap "rm -f $tmpA1 $tmpA2; exit 1" 1 2 3 15

if convert -quiet -regard-warnings "$infile" +repage "$tmpA1"
then
: 'do nothing'
else
echo "--- FILE $infile DOES NOT EXIST OR IS NOT AN ORDINARY FILE, NOT READABLE OR HAS ZERO SIZE ---"
fi
exit 0


Returns:
magick/blob.c:3726: failed assertion `data != (const unsigned char *) NULL'
test_read5b: line 20: 17102 Abort trap convert -quiet -regard-warnings "$infile" +repage "$tmpA1"
--- FILE mandril.jpg DOES NOT EXIST OR IS NOT AN ORDINARY FILE, NOT READABLE OR HAS ZERO SIZE ---


I get same results with miff, but png works just fine. (See commented lines for alternate tmpA1). Most other images I have tried work fine also. So I am not sure if this is a bug or some subtle problem with this image. If the latter, my apologies.

Thanks.

Fred

Re: possible miff/mpc bug in IM 6.4.7-3

Posted: 2008-12-08T19:05:48-07:00
by magick
It seems your image has a IPTC resource block of 0 length. We have a patch in ImageMagick 6.4.7-4 to check for this problem. Thanks.