CR2 RAW file conversion

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.
jose.sanpedro
Posts: 14
Joined: 2015-02-10T11:30:35-07:00
Authentication code: 6789

Re: CR2 RAW file conversion

Post by jose.sanpedro »

comparing the original (foto.cr2) with the new one (foto3.jpg). im using my own pictures...not the same files posted above.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: CR2 RAW file conversion

Post by snibgo »

But what software are you viewing foto.cr2 with? It doesn't contain RGB pixels, so some software is converting it.
snibgo's IM pages: im.snibgo.com
jose.sanpedro
Posts: 14
Joined: 2015-02-10T11:30:35-07:00
Authentication code: 6789

Re: CR2 RAW file conversion

Post by jose.sanpedro »

i'm using photoshop.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: CR2 RAW file conversion

Post by snibgo »

What adjustments are needed to make the PS and IM results match? Were the camera settings at neutral? (PS will probably use them. IM won't.)
snibgo's IM pages: im.snibgo.com
jose.sanpedro
Posts: 14
Joined: 2015-02-10T11:30:35-07:00
Authentication code: 6789

Re: CR2 RAW file conversion

Post by jose.sanpedro »

i cant tell about camera settings, because i did not took the picture.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: CR2 RAW file conversion

Post by snibgo »

Exiftool can tell you.
snibgo's IM pages: im.snibgo.com
jose.sanpedro
Posts: 14
Joined: 2015-02-10T11:30:35-07:00
Authentication code: 6789

Re: CR2 RAW file conversion

Post by jose.sanpedro »

File name : foto.cr2
File size : 24462447 Bytes
MIME type : image/x-canon-cr2
Image size : 5472 x 3648
Camera make : Canon
Camera model : Canon EOS 70D
Image timestamp : 2016:02:21 12:32:18
Image number :
Exposure time : 1/100 s
Aperture : F2
Exposure bias : 0 EV
Flash : No, compulsory
Flash bias : 0 EV
Focal length : 50.0 mm
Subject distance: 01.99 m3.50 m
ISO speed : 100
Exposure mode : Manual
Metering mode : Multi-segment
Macro mode : Off
Image quality : RAW
Exif Resolution : 5472 x 3648
White balance : Manual Temperature (Kelvin)
Thumbnail : image/jpeg, 17031 Bytes
Copyright :
Exif comment :
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: CR2 RAW file conversion

Post by fmw42 »

convert E1DXINBI003200.CR2 -set colorspace RGB -resize 800x600 -colorspace sRGB out.png
Depending upon your IM version, you may need to use -set colorspace sRGB or -set colorspace RGB and vice-versa for -colorspace.

What is your IM version and platform?

i tried, but the result is not good. image is dark and colors do not match with the original image.
Describe how the colors are different?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: CR2 RAW file conversion

Post by fmw42 »

i'm using photoshop.
Photoshop could be assigning a different (Adobe) profile than sRGB when the file is opened. That might change the colors slightly.
jose.sanpedro
Posts: 14
Joined: 2015-02-10T11:30:35-07:00
Authentication code: 6789

Re: CR2 RAW file conversion

Post by jose.sanpedro »

im using ImageMagick-6.9.3-Q16 on windows 64 bits

with

Code: Select all

convert E1DXINBI003200.CR2 -set colorspace RGB -resize 800x600 -colorspace sRGB out.png
seems like the picture is behind a light green glass.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: CR2 RAW file conversion

Post by fmw42 »

Can you post your raw .CR2 file to some free hosting service such as dropbox.com and put the URL here so that the experts on raw formats can check and test with your image file?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: CR2 RAW file conversion

Post by fmw42 »

I am no expert at raw images. But have you tried:

Code: Select all

convert E1DXINBI003200.CR2 -set colorspace sRGB -resize 800x600 out.png
jose.sanpedro
Posts: 14
Joined: 2015-02-10T11:30:35-07:00
Authentication code: 6789

Re: CR2 RAW file conversion

Post by jose.sanpedro »

snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: CR2 RAW file conversion

Post by snibgo »

jose.sanpedro wrote:dcraw -v -6 -A 2000 2000 1000 1000 -T -O foto3.jpg foto.cr2
What made you choose that area to make average gray? A different result comes from using the white balance that was recorded by the camera:
jose.sanpedro wrote:dcraw -v -6 -w -T -O foto3.jpg foto.cr2
snibgo's IM pages: im.snibgo.com
jose.sanpedro
Posts: 14
Joined: 2015-02-10T11:30:35-07:00
Authentication code: 6789

Re: CR2 RAW file conversion

Post by jose.sanpedro »

i found that code here https://www.imagemagick.org/discourse-s ... hp?t=25424

i tried

Code: Select all

dcraw -v -6 -w -T -O foto3.jpg foto.cr2
but did not see any difference

looks the same using

Code: Select all

dcraw -v -6 -A 2000 2000 1000 1000 -T -O foto3.jpg foto.cr2
Post Reply