Posts Tagged ‘linux’

Convert from Nikon RAW .NEF to JPEG?

Why waste time with CPU/GPU consuming GUI apps on Linux to get your photos converted from Nikon RAW files to JPEG?

Here is how to do it:

  1. Create a folder on your Linux box in a file system free enough to hold the data to be copied x2, that is if you have 4 GB for example, make sure it can take around 9 GB, for the time being
  2. copy the NEF files into this folder
  3. run the following shell script

for i in `ls *.NEF`
exiftool -b -JpgFromRaw $i > $i.JPG
rm -rf $i

Now you have your photos converted into JPEG format with the names DSC_xxx.NEF.JPG

if you want to rename it to be DSC_xxx.jpg, then I know one lame method to do so as follows:

  1. Type: >process
  2. Then Type:
  3. for i in `ls *.JPG`
    echo “mv $i $i” > process

  4. Type: vi process
  5. Now you are editing a file containing all File Names
  6. Press Escape, then type the following:
  7. :0,$s/NEF\.JPG/jpg/g

  8. then press Enter, and wait for it to finish
  9. then press Esc
  10. then type :wq
  11. then enter
  12. now type chmod +x process
  13. then ./process

now your files are ready with the desired format