I have been using the following custom script to create raw thumbnails. It overlays text indicating the raw file type (ORF / NEF / CR2 etc.) over the thumbnail image so as to make it easy to distinguish between a jpeg image and a raw image. Particularly useful when shooting in raw + jpg mode, where one gets two identical thumbnails (one for raw and one for jpg) and distinguishing between them requires careful inspection of the extension. This script eliminates the need for such careful inspection.
The following script is located at /home/sarang/bin/my-raw-thumbnailer/my-raw-thumbnailer.bash
Code:
#!/bin/bash
# usage: my-raw-thumbnailer size inputfilename outputfilename
set -e
SIZE="$1";
INPUT="$2";
OUTPUT="$3";
RAW_STAMP="$(echo "$INPUT" | sed 's/.*\.//')";
RAW_STAMP=" ${RAW_STAMP^^} ";
ufraw-batch --embedded-image --out-type=png --size="$SIZE" "$INPUT" --overwrite --silent --output=-| convert - -fill white -undercolor black -gravity SouthWest -pointsize 16 -font '/usr/share/fonts/truetype/ttf-droid/DroidSans-Bold.ttf' -annotate +0+0 "${RAW_STAMP}" "$OUTPUT"
unset SIZE INPUT OUTPUT RAW_STAMP
exit 0
Also, /usr/share/thumbnailers/raw.thumbnailer has:
Code:
[Thumbnailer Entry]
Exec=/home/sarang/bin/my-raw-thumbnailer/my-raw-thumbnailer.bash %s %u %o
MimeType=image/x-3fr;image/x-adobe-dng;image/x-arw;image/x-bay;image/x-canon-cr2;image/x-canon-crw;image/x-cap;image/x-cr2;image/x-crw;image/x-dcr;image/x-dcraw;image/x-dcs;image/x-dng;image/x-drf;image/x-eip;image/x-erf;image/x-fff;image/x-fuji-raf;image/x-iiq;image/x-k25;image/x-kdc;image/x-mef;image/x-minolta-mrw;image/x-mos;image/x-mrw;image/x-nef;image/x-nikon-nef;image/x-nrw;image/x-olympus-orf;image/x-orf;image/x-panasonic-raw;image/x-pef;image/x-pentax-pef;image/x-ptx;image/x-pxn;image/x-r3d;image/x-raf;image/x-raw;image/x-rw2;image/x-rwl;image/x-rwz;image/x-sigma-x3f;image/x-sony-arw;image/x-sony-sr2;image/x-sony-srf;image/x-sr2;image/x-srf;image/x-x3f;
Sample output is attached.
Bookmarks