dcraw is a linux/Windows command line tool. It can convert RAW-files and that does also include Nikons NEF-files.
Raw photo decoder "dcraw" v8.73 by Dave Coffin, dcoffin a cybercom o net Usage: dcraw [OPTION]... [FILE]... -v Print verbose messages -c Write image data to standard output -e Extract embedded thumbnail image -i Identify files without decoding them -i -v Identify files and show metadata -z Change file dates to camera timestamp -w Use camera white balance, if possible -a Average the whole image for white balance -AAverage a grey box for white balance -r Set custom white balance -C Correct chromatic aberration -b Adjust brightness (default = 1.0) -n Set threshold for wavelet denoising -k Set black point -K Subtract dark frame (16-bit raw PGM) -H [0-9] Highlight mode (0=clip, 1=unclip, 2=blend, 3+=rebuild) -t [0-7] Flip image (0=none, 3=180, 5=90CCW, 6=90CW) -o [0-5] Output colorspace (raw,sRGB,Adobe,Wide,ProPhoto,XYZ) -o Apply output ICC profile from file -p Apply camera ICC profile from file or "embed" -d Document mode (no color, no interpolation) -D Document mode without scaling (totally raw) -j Don't stretch or rotate raw pixels -q [0-3] Set the interpolation quality -h Half-size color image (twice as fast as "-q 0") -f Interpolate RGGB as four colors -s [0-99] Select a different raw image from the same file -4 Write 16-bit linear instead of 8-bit with gamma -T Write TIFF instead of PPM
Create a TIFF file and use the cameras White Balance (WB)
dcraw -w -T DSC_8119.NEF
Create a TIFF file and use the average White Balance (WB) on the picture
dcraw -a -T DSC_8119.NEF
Set the filedate to be the same as the picture date according to the EXIF information
dcraw -z filnavn
Options I often use
dcraw.exe -v -w -H 2 -T DSC_4228.NEF
Posted by Hans-Henry Jakobsen
1. download photos from camera and sort them by date of day in folders
2. remove possible duplicates if I did not erase camera images since last download
3. convert RAW/NEF images to a usable format
All this in one single click!
#!/bin/bash
# Change this to where to store Photos
target=/home/multimedia/Images
camera=”USB PTP Class Camera”
date=$(date –iso-8601)
mkdir -p $target/$date/tmp
cd $target/$date/tmp
# Get all photos from camera
gphoto2 –quiet –camera $camera –port usb: -P
# Do not replace photos that were already uploaded this same day
cp -u $target/$date/tmp/* $target/$date
rm -rf $target/$date/tmp
cd $target/$date
# auto-rotate using exif info
exifautotran *.JPG
# If photos were not erased from camera since last upload, remove duplicates
for i in *.{JPG,NEF}; do
for f in $(find $target -name $i ! -samefile $target/$date/$i); do
if md5sum $f | sed -e “s, .*/, ,” | md5sum –check; then
rm -f $i;
fi
done
done
# decode RAW images if not already done ?
# for i in *.NEF; do if [ ! -e $(basename $i .NEF).ppm ]; then dcraw -w $i; fi; done
# Show them!
gimv -d $target/$date
Tags: bash, dcraw, EXIF, exifautotran, gimv, gphoto2, JPG, md5sum, NEF, sed
Posted by Hans-Henry Jakobsen