]>
Commit | Line | Data |
---|---|---|
02d1d628 AMH |
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' | |
3 | ||
4 | ######################### We start with some black magic to print on failure. | |
5 | ||
6 | # Change 1..1 below to 1..last_test_to_print . | |
7 | # (It may become useful if the test is moved to ./t subdirectory.) | |
8 | ||
9 | BEGIN { $| = 1; print "1..6\n"; } | |
10 | END {print "not ok 1\n" unless $loaded;} | |
11 | ||
12 | use Imager qw(:all); | |
13 | ||
14 | $loaded = 1; | |
15 | ||
16 | Imager::init('log'=>'testout/t40scale.log'); | |
17 | print "ok 1\n"; | |
18 | ||
19 | $img=Imager->new(); | |
20 | ||
21 | $img->open(file=>'testimg/scale.ppm',type=>'pnm') or print "failed: ",$scaleimg->{ERRSTR},"\n"; | |
22 | print "ok 2\n"; | |
23 | ||
24 | $scaleimg=$img->scale(scalefactor=>0.25) or print "failed: ",$scaleimg->{ERRSTR},"\n"; | |
25 | print "ok 3\n"; | |
26 | ||
27 | $scaleimg->write(file=>'testout/t40scale1.ppm',type=>'pnm') or print "failed: ",$scaleimg->{ERRSTR},"\n"; | |
28 | print "ok 4\n"; | |
29 | ||
30 | $scaleimg=$img->scale(scalefactor=>0.25,qtype=>'preview') or print "failed: ",$scaleimg->{ERRSTR},"\n"; | |
31 | print "ok 5\n"; | |
32 | ||
33 | $scaleimg->write(file=>'testout/t40scale2.ppm',type=>'pnm') or print "failed: ",$scaleimg->{ERRSTR},"\n"; | |
34 | print "ok 6\n"; | |
35 | ||
36 |