Unit bug in constitute / ReadImage

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
mootools
Posts: 19
Joined: 2005-06-30T06:08:40-07:00
Location: France

Unit bug in constitute

Post by mootools » 2007-10-26T01:09:50-07:00

Hello,

I just download the latest image magick package and I found an annoying bug in constitute.c / ReadImage
The function incorrectly set the image units as shown above.

The concerned lines are:

value=GetImageProperty(next,"TIFF:ResolutionUnit");
if (value == (char *) NULL)
value=GetImageProperty(next,"EXIF:YResolution"); // Aïe Aïe Aïe! Error this should be EXIF:ResolutionUnit!
if (value != (char *) NULL)
{
next->units=(ResolutionType) (atoi(value)-1);
(void) DeleteImageProperty(next,"EXIF:ResolutionUnit");
(void) DeleteImageProperty(next,"TIFF:ResolutionUnit");
}


This bad bug results in the lost of units for JPEG image for example.

I hope it will be corrected in a futur release.

Manuel
Manuel Jouglet
Mootools

User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Unit bug in constitute / ReadImage

Post by magick » 2007-10-26T05:29:52-07:00

Thanks for the copy/paste problem your reported. We have a patch against ImageMagick 6.3.6-4 Beta that fixes the problem.

Post Reply