3

I want to convert .dng file extension to .png/.jpg format. Here is my command line:

convert /var/www/html/img/10fassettsquare.dng /var/www/html/img/14.png

I am trying to convert but it shows an error : unable to open file 1.dng file. Other file conversion is working fine except .dng file.

Please help, I have been struggling for the last 10 days to solve this and I am unable to make it.

5

Interestingly enough the Repository imagemagick package in Ubuntu 16.04 claims to support Adobe Digital Negative Raw (DNG) Image files:

andrew@corinth:~$ identify -list format | grep -i dng
      3FR  DNG       r--   Hasselblad CFV/H3D39II
      ARW  DNG       r--   Sony Alpha Raw Image Format
      CR2  DNG       r--   Canon Digital Camera Raw Image Format
      CRW  DNG       r--   Canon Digital Camera Raw Image Format
      DCR  DNG       r--   Kodak Digital Camera Raw Image File
      DNG  DNG       r--   Digital Negative
      ERF  DNG       r--   Epson RAW Format
      K25  DNG       r--   Kodak Digital Camera Raw Image Format
      KDC  DNG       r--   Kodak Digital Camera Raw Image Format
      MEF  DNG       r--   Mamiya Raw Image File
      MRW  DNG       r--   Sony (Minolta) Raw Image File
      NEF  DNG       r--   Nikon Digital SLR Camera Raw Image File
      NRW  DNG       r--   Nikon Digital SLR Camera Raw Image File
      ORF  DNG       r--   Olympus Digital Camera Raw Image File
      PEF  DNG       r--   Pentax Electronic File
      RAF  DNG       r--   Fuji CCD-RAW Graphic File
      RAW  DNG       r--   Raw
      RMF  DNG       r--   Raw Media Format
      RW2  DNG       r--   Panasonic Lumix Raw Image
      SR2  DNG       r--   Sony Raw Format 2
      SRF  DNG       r--   Sony Raw Format
      X3F  DNG       r--   Sigma Camera RAW Picture File
andrew@corinth:~$ 

However conversion of these files with imagemagick fails with a welter of error messages. This is confirmed on my own Ubuntu 16.04 installation as well as yours.

If you install the Unidentified Flying Raw (UFRaw) package though all will then be well:

sudo apt-get install ufraw-batch

This tested perfectly on my system, with my own sample file, and should also on yours (note especially the call to ufraw-batch in the Terminal output):

andrew@corinth:~/Desktop$ convert -verbose L1004220.DNG test.png
"ufraw-batch" --silent --create-id=also --out-type=png --out-depth=16 "--output=/tmp/magick-3253fgAn5Rixofwy.png" "/tmp/magick-3253IyazXOpb6yKj"
 Found a generic profile, type exif
/tmp/magick-3253fgAn5Rixofwy.png PNG 5216x3472 5216x3472+0+0 16-bit sRGB 92.39MB 1.100u 0:01.110
L1004220.DNG=>/tmp/magick-3253fgAn5Rixofwy.png DNG 5216x3472 5216x3472+0+0 16-bit sRGB 92.39MB 0.010u 0:00.009
writing raw profile: type=exif, length=6064
L1004220.DNG=>test.png DNG 5216x3472 5216x3472+0+0 16-bit sRGB 92.19MB 6.090u 0:06.210
andrew@corinth:~/Desktop$ 
  • ya i installed ufraw-batch but when i am going to run : convert -verbose L1004220.DNG test.png, is showing errror : unable to access configure file delegates.xml' no decode delegate for this image format ' @ error/constitute.c/ReadImage/501. Why this type of error showing? – Pratap-DPHP Jan 22 at 12:08
  • 1
    @Pratap-DPHP Simply run your original command (as given in your question). My command is only an example on my own system... – andrew.46 Jan 22 at 12:10
  • ya i used my command – Pratap-DPHP Jan 22 at 12:50
  • @Pratap-DPHP And with your command + install ufraw-batch there was success? – andrew.46 Jan 22 at 22:52
1

If you are ok with ShotWell,

  1. open .dng files with it

  2. go to -> File -> Save as... -> select preferred format (i.e., png) and save location

  3. click OK button to save.

enter image description here

  • 1
    thanks for your reply.but i need it to do grammatically. – Pratap-DPHP Jan 22 at 12:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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