filmless/scripts/calibration.sh

24 lines
638 B
Bash
Raw Normal View History

2020-02-11 23:10:37 +00:00
#!/bin/bash
# Script to change the generated calibration tif files to
# properly scaled files that is a lossless png. The resulting
# file should be massively smaller--100's of MBs to KBs.
#Requires ImageMagick
#Printer DPI
DPI=1440
#Location of calibration files
CALIBRATION_FILES="../filmless_calibration/*.tif"
echo "Changing calibration files to ${DPI}dpi and converting to .png..."
for f in $CALIBRATION_FILES
do
name=$(basename "$f" .tif)
#echo $name
echo "Converting $f -> ../filmless_calibration/${name}.png @ ${DPI}dpi..."
2020-02-11 23:10:37 +00:00
convert $f -units PixelsPerInch -density $DPI "../filmless_calibration/${name}.png"
rm $f
done