possible miff/mpc bug in IM 6.4.7-3

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

possible miff/mpc bug in IM 6.4.7-3

Post 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
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

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

Post 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.
Post Reply