#!/bin/sh

NONA='nona -t 2'
ENBL='enblend -w -z -m 768 -f 3922x5229'
CONV='convert -limit memory 512 -limit map 256'

#${NONA} -o tmp+1- home-window-13+1.pto
#${NONA} -o tmp+0- home-window-13+0.pto
#${NONA} -o tmp-1- home-window-13-1.pto

#${ENBL} -o tmp+1.tiff tmp+1-0*.tif
#${ENBL} -o tmp+0.tiff tmp+0-0*.tif
#${ENBL} -o tmp-1.tiff tmp-1-0*.tif
rm -f tmp+1-0*.tif tmp+0-0*.tif tmp-1-0*.tif

${NONA} -o hdr- home-window-13-hdr.pto
#rm -f tmp[+-][0-9].tiff

${CONV} hdr-0000.tif -crop 3584x4992+160+192 +repage -noise 2 -adaptive-sharpen 4x1 -filter triangle -support 1.1 -resize 1536 -compress LZW hdr-1.tiff
${CONV} hdr-0001.tif -crop 3584x4992+160+192 +repage -noise 2 -adaptive-sharpen 4x1 -filter triangle -support 1.1 -resize 1536 -compress LZW hdr+0.tiff
${CONV} hdr-0002.tif -crop 3584x4992+160+192 +repage -noise 2 -adaptive-sharpen 4x1 -filter triangle -support 1.1 -resize 1536 -compress LZW hdr+1.tiff
#rm -f hdr-00*.tif
