1 # Before `make install' is performed this script should be runnable with
2 # `make test'. After `make install' it should work as `perl test.pl'
4 ######################### We start with some black magic to print on failure.
6 # Change 1..1 below to 1..last_test_to_print .
7 # (It may become useful if the test is moved to ./t subdirectory.)
9 BEGIN { $| = 1; print "1..2\n"; }
10 END {print "not ok 1\n" unless $loaded;}
17 init_log("testout/t00basicoo.log",1);
21 %hsh=%Imager::formats;
23 print "# avaliable formats:\n";
24 for(keys %hsh) { print "# $_\n"; }
30 @all=qw(tiff gif jpg png ppm raw);
33 if (!$hsh{$_}) { next; }
34 print "#opening Format: $_\n";
36 $img->read(file=>"testout/t10.$_",type=>'raw', xsize=>150,ysize=>150) or die "failed: ",$img->{ERRSTR},"\n";
38 $img->read(file=>"testout/t10.$_") or die "failed: ",$img->{ERRSTR},"\n";
42 $img2=$img->crop(width=>50,height=>50);
43 $img2->write(file=>'testout/t50.ppm',type=>'pnm');