RAW conversion 16bit and 8bit mixed

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
jn0101
Posts: 40
Joined: 2007-06-16T01:36:07-07:00

RAW conversion 16bit and 8bit mixed

Post by jn0101 »

When converting from RAW format, for example

convert CR2_MG_2959.CR2 x.tif

the image gets very distorted in its colors (using ImageMagick 6.3.8 02/16/08 Q8).
I suppose its becaurse color depth is interpreted wrongly.

I noticed that IM is using this comand behind the scenes to create e PNM image:
ufraw-batch --silent --wb=camera --black-point=auto --exposure=auto --create-id=also --out-type=ppm16 --output=/tmp/magick-XX3yR6J7.pnm /tmp/magick-XXOZ46SS

If I invoke ufraw-batch manually
ufraw-batch --silent --wb=camera --black-point=auto --exposure=auto --create-id=also --out-type=ppm16 CR2_MG_2959.CR2 --output=x.pnm
and looks this PNM image looks fine.

However,
convert x.pnm x.tif
gives the color distorted image.

If I instead use
ufraw-batch --silent --wb=camera --black-point=auto --exposure=auto --create-id=also --out-type=ppm8 CR2_MG_2959.CR2 --output=x.pnm

(changing --out-type=ppm16 to --out-type=ppm8) then I get an image that convert subsequently converts correct.


My suggestions is therefore that you either
1) change from --out-type=ppm16 to --out-type=ppm8 in case of Q8
2) makes IM Q8 read 16-bit pnm images correct


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

Re: RAW conversion 16bit and 8bit mixed

Post by magick »

We can reproduce the problem and will have a fix in ImageMagick 6.3.8-10 available within a week or two. Thanks for alerting us to the problem.
Post Reply