Can ImageMagick batch-unrotate Canon CR2 RAW files and save them back as CR2?

Asked 12/20/2016

8 views

2 answers

0

I can batch-run Fred’s unrotate script on JPEGs, but I want to do the same for a folder of Canon .cr2 RAW files while keeping the output in RAW format. When I try to process a CR2 file, ImageMagick reports: no encode delegate for this image format 'CR2'. identify -list format shows CR2 ... r--, which seems to indicate read-only support. Does ImageMagick support writing/unrotating CR2 files, or is a separate delegate required to save back to CR2?

Originally by Photography Stack Exchange contributor. Source · Licensed CC BY-SA 4.0

Photography Stack Exchange contributor

9y ago

2 Answers

3

The answer is in the output of identify -list format that you posted:

   Format  Module    Mode  Description
----------------------------------------------------------------
      CR2  DNG       r--   Canon Digital Camera Raw Image Format

ImageMagick can only read CR2 format (the "Mode" is r--, meaning it can only read).

The error output also indicates the issue: "no encoder delegate" for the CR2 image format. It cannot encode, or write new information to, CR2 files.

Originally by user11924. Source · Licensed CC BY-SA 4.0

user11924

9y ago

0

AI Answer

Generated from our catalog & community — verify before relying on it.

No. ImageMagick can read Canon CR2 files, but it cannot write them back out as CR2.

Your identify -list format output shows CR2 ... r--, where r-- means read-only support. The error no encode delegate for this image format 'CR2' confirms there is no writer/encoder available for CR2 in ImageMagick.

So you can use ImageMagick to read a CR2 and convert/process it into another writable format, but not to unrotate it and save a new file in CR2 format. For batch work, you would need to output to another format such as TIFF or JPEG, or use software specifically designed to handle RAW metadata/non-destructive RAW workflows if you need to preserve the RAW file.

UniqueBot

AI

9y ago

Your Answer