How to convert DNG (RAW) files to PNG?

Attempting to convert DNG files to PNG with Imagemagick returns the error:

convert: no encode delegate for this image format `DNG' @ error/constitute.c/WriteImage/[...]

Installing the ufraw package didn’t resolve the issue.

$ identify -list format | grep DNG outputs:


      3FR  DNG       r--   Hasselblad CFV/H3D39II (0.21.1-Release)
      ARW  DNG       r--   Sony Alpha Raw Image Format (0.21.1-Release)
      CR2  DNG       r--   Canon Digital Camera Raw Image Format (0.21.1-Release)
      CR3  DNG       r--   Canon Digital Camera Raw Image Format (0.21.1-Release)
      CRW  DNG       r--   Canon Digital Camera Raw Image Format (0.21.1-Release)
      DCR  DNG       r--   Kodak Digital Camera Raw Image File (0.21.1-Release)
    DCRAW  DNG       r--   Raw Photo Decoder (dcraw) (0.21.1-Release)
      DNG  DNG       r--   Digital Negative (0.21.1-Release)
      ERF  DNG       r--   Epson RAW Format (0.21.1-Release)
      IIQ  DNG       r--   Phase One Raw Image Format (0.21.1-Release)
      K25  DNG       r--   Kodak Digital Camera Raw Image Format (0.21.1-Release)
      KDC  DNG       r--   Kodak Digital Camera Raw Image Format (0.21.1-Release)
      MEF  DNG       r--   Mamiya Raw Image File (0.21.1-Release)
      MRW  DNG       r--   Sony (Minolta) Raw Image File (0.21.1-Release)
      NEF  DNG       r--   Nikon Digital SLR Camera Raw Image File (0.21.1-Release)
      NRW  DNG       r--   Nikon Digital SLR Camera Raw Image File (0.21.1-Release)
      ORF  DNG       r--   Olympus Digital Camera Raw Image File (0.21.1-Release)
      PEF  DNG       r--   Pentax Electronic File (0.21.1-Release)
      RAF  DNG       r--   Fuji CCD-RAW Graphic File (0.21.1-Release)
      RAW  DNG       r--   Raw (0.21.1-Release)
      RMF  DNG       r--   Raw Media Format (0.21.1-Release)
      RW2  DNG       r--   Panasonic Lumix Raw Image (0.21.1-Release)
      SR2  DNG       r--   Sony Raw Format 2 (0.21.1-Release)
      SRF  DNG       r--   Sony Raw Format (0.21.1-Release)
      X3F  DNG       r--   Sigma Camera RAW Picture File (0.21.1-Release)

Has to be a command-line tool, if Imagemagick somehow can’t support the format on Fedora.

I used darktable-cli instead, a sample command from an Ask Ubuntu question:

find . -type f \( -iname "*.dng" \) -exec sh -c 'darktable-cli {} ${0%.*}.png' {} \;

I’ve edited the command slightly (replaced the file extensions, removed the -delete flag).

1 Like