#!/usr/bin/perl use Image::Magick; opendir(DIR,"./"); @pics = grep { /.JPG$/ && -f "$_" } readdir(DIR); closedir(DIR); while(<@pics>) { $_ =~ s/(.*)\..../$1/; $page .= ""; # $page .= "S\n"; # $page .= "M\n"; # $page .= "L\n"; push(@list,$_); while(0) { #begin big comment print "Processing $_"; # Read in the image $model = Image::Magick->new(); $x = $model->ReadImage("$_.JPG"); warn "$x" if "$x"; foreach $y (10,25,50) { # Scale the image $example = $model->Clone(); $example->Label('Scale'); $example->Scale("$y%"); # Write out the image $example->Write("$_-$y.jpg"); if($y eq "50") { print ".\n" } else { print "." } } $example = $model->Clone(); $example->Label('Scale'); $example->Scale('120'); $example->Write("$_-0.jpg"); } #end big comment } open(OUTPUT,">index.html"); print OUTPUT "
"; print OUTPUT <