#!/bin/sh

IN=P1000467
OUT=winter-0000

dcraw -v \
    -n 240 \
    -r 1.530 1.000 2.120 1.025 \
    -q 3 \
    -H 5 \
    -T -4 ${IN}.RAW
convert ${IN}.tiff \
    -background transparent -rotate 3.0 \
    -crop 1792x2688+256+128 +repage \
    -modulate 320,102 \
    -gamma 1.85 \
    -adaptive-sharpen 4x2 \
    -compress LZW ${IN}.tiff
convert ${IN}.tiff -quality 90 ${OUT}-big.jpeg
convert ${IN}.tiff \
    -filter triangle -support 0.95 -resize x768 \
    -quality 90 ${OUT}.jpeg
convert ${IN}.tiff \
    -filter triangle -support 0.95 -resize x256 \
    -quality 90 ${OUT}-small.jpeg
