#!/bin/sh

IN=P1000481
OUT=winter-0001

dcraw -v \
    -n 240 \
    -r 2.070959 0.990000 1.552507 1.04000 \
    -q 3 \
    -H 3 \
    -T -4 \
    ${IN}.RAW
convert ${IN}.tiff \
    -crop 3216x2144+456+0 +repage \
    -recolor 1x1 \
    -modulate 242,133 \
    -gamma 2.20 \
    -adaptive-sharpen 4x2 \
    -compress LZW ${IN}.1.tiff
convert ${IN}.tiff \
    -crop 3216x2144+456+0 +repage \
    -modulate 420,103 \
    -gamma 1.75 \
    -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
