0
\$\begingroup\$

ImageMagick's mogrify seems to be making my images warm-colored when I convert them to a non-raw format. Why is this? I've tried this with .jpg, .png, and .jxl.

I converted the same image with ufraw and the colors seem to come out mostly correctly, besides the pink that appears in the sky for some reason.

I took this picture with a Canon Rebel T5i (EOS-700D).

Commands used:

magick mogrify -format jpg <img>

magick mogrify -format png <img>

magick mogrify -format jxl <img>

ufrawbatch --out-type png <img>

ufrawbatch --out-type jpg <img>

Link to pictures: https://drive.proton.me/urls/9STQ3HH2X4#oTveTDRjCSEc

Password: iQX5v69QzoM9rgLwrc9iNUH6y6ZvFa6LFg7UcLXnGDkT enter image description here Here is the ufraw image for reference. This was the only one that was small enough to upload on imgur and therefore embed.

\$\endgroup\$

1 Answer 1

3
\$\begingroup\$

You're never seeing "THE raw image" on your screen. What you're seeing is a conversion of the raw data into a demosaiced color image with white point, black point, white balance, contrast curves, etc. applied.

From this answer to Why and how capturing RAW image instead of JPEG helps with editing:

**Anytime you open a raw file and look at it on your screen, you are not viewing "THE raw file."**¹ You are viewing one among a near-countless number of possible interpretations of the data in the raw file. The raw data itself contains a single (monochrome) brightness value measure by each pixel well. With Bayer masked camera sensors (the vast majority of color digital cameras use Bayer filters) each pixel well has a color filter in front of it that is either 'red', 'green', or 'blue' (the actual 'colors' of the filters in most Bayer Masks are anywhere from a slightly yellowish-green to an orange-yellow for 'red", a slightly yellow green for 'green' and a slightly violet blue for 'blue' - these colors more or less correspond to the center of sensitivity for the three types of cones in our retinas). For a more complete discussion of how we get color information out of the single brightness values measured at each pixel well, please see RAW files store 3 colors per pixel, or only one?
¹ Please see: Why are my RAW images already in colour if debayering is not done yet?

In the case of ImageMagick, when you first open the image, you're almost certainly viewing the camera generated JPEG that is attached to the raw file when the photo is taken. When you convert and export, you're seeing the result of ImageMagick's processing routines applied to the raw data contained in the file. The processing algorithms the camera used and the those ImageMagick used are different. Thus the results are also different.

Since there's no single "correct" way to process and display the information in a raw image file different applications, such as ImageMagick and ufraw, will each process them slightly differently, especially with each application's default settings applied. Using different instruction sets, the results will look different.

For a more extensive look at what raw files are and what they are not, and how different processing applications will produce different results, please see:

Why and how capturing RAW image instead of JPEG helps with editing
What does an unprocessed RAW file look like?
RAW files store 3 colors per pixel, or only one?

\$\endgroup\$
1
  • \$\begingroup\$ Thanks, I thought that might be the case, but I wasn't sure. \$\endgroup\$
    – Shidouuu
    Sep 3, 2023 at 15:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.