Error with BlobToImage when blob is a CR2 file

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
rmagick
Posts: 245
Joined: 2006-03-16T17:30:48-07:00
Location: Durham, NC, USA

Error with BlobToImage when blob is a CR2 file

Post by rmagick »

An RMagick user is trying to convert a CR2 format blob (acquired via the web) into an image using RMagick's BlobToImage wrapper. With regard to the caution "Requires an explicit image format otherwise the image is interpreted as a TIFF image" he tells RMagick to set the image_info.magick field to "CR2". Nevertheless, with ImageMagick 6.3.7, the image is read in as a TIFF file.

With 6.4.5-0, ImageMagick raises the exception "compression not supported `/home/tim/tmp/magick-XXcLJ1cR'".

The identify command correctly interprets the file as a CR2 file. I suppose this is because the file has a CR2 extension.

I can write a C test program if it would help. I looked at the code and it appears that BlobToImage writes the blob to a temp file but discards the value in the image_info->magick field before reading the file back in. I'm more than happy to do something in RMagick if that's what it takes to make this work.

Here's the input image.

http://s179771984.onlinehome.us/RAWposi ... G_8587.CR2
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Error with BlobToImage when blob is a CR2 file

Post by magick »

We have a patch for the problem you reported. Look for it in the Subversion trunk sometime tomorrow and it will be available as ImageMagick 6.4.5-1 Beta. Thanks.
rmagick
Posts: 245
Joined: 2006-03-16T17:30:48-07:00
Location: Durham, NC, USA

Re: Error with BlobToImage when blob is a CR2 file

Post by rmagick »

Thanks! I'll tell the user.
Post Reply