Celeb Glow
general | March 25, 2026

Convert .dng to .png is not working in Ubuntu 16.04

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.

2 Answers

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$ 
4

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

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

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