#!/usr/local/bin/perl -w
#

$x = 3152;
$y = 4962;
$file = "0480";
$factor = 4;

$smallx = $x / $factor;
$smally = $y / $factor;

for $file (1 .. 1152) {
	$fullfile = sprintf("%04d", $file);
	print "$fullfile\n";
	# next;
	$command = "convert -geometry ${smallx}x${smally} -quality 95 -colors 16" .
		" /tmp/tiffs/$fullfile.tif $fullfile.png";
	`$command`;
}

