#!/bin/sh

IN=P1000482
OUT=winter-0002

dcraw -v \
    -n 240 \
    -r 2.025 1.000 1.580 1.025 \
    -q 3 \
    -H 5 \
    -T -4 ${IN}.RAW
convert ${IN}.tiff \
    -crop 2416x3608+0+64 +repage \
    -modulate 428,105 \
    -gamma 1.90 \
    -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
