#!/usr/bin/perl -w

#while (defined($nextname = <sitrescan4??r.jpg>)) {
while (defined($nextname = <fuzzy????.jpg>)) {
 # create filenames
    $filed = $nextname;
    $filev = $filed;
    $files = sprintf("u%s", $filev);
    #$files =~ s/sd/s/;

    printf("Generating $files from $filed\n");
    #`djpeg $filev > deleteme_big.ppm`;
    #`pnmscale -xscale .25 -yscale .25 deleteme_big.ppm > deleteme_small.ppm`;
    #`pamcut -left 603 -top 582 -width 3894 -height 2190 deleteme_big.ppm > deleteme_small.ppm`;
    #`cjpeg -quality 98 deleteme_small.ppm > $files`;
    #plusx4 straight scope: `convert $filed -rotate 2.31 -crop 2176x1632+584+236 $files`;
    `convert $filed -rotate 180 $files`;
}

