4 use Test::More tests => 8;
5 BEGIN { use_ok(Imager => qw(:default)); }
7 use Imager::Test qw(test_image);
11 -d "testout" or mkdir "testout";
13 Imager->open_log(log => 'testout/t60dyntest.log');
15 my $img=Imager->new() || die "unable to create image object\n";
17 $img->read(file=>'../testimg/penguin-base.ppm',type=>'pnm')
18 || die "failed: ",$img->{ERRSTR},"\n";
20 my $plug='./dyntest.'.$Config{'so'};
21 ok(load_plugin($plug), "load plugin")
22 || die "unable to load plugin: $Imager::ERRSTR\n";
24 my %hsh=(a=>35,b=>200,type=>'lin_stretch');
25 ok($img->filter(%hsh), "call filter");
27 $img->write(type=>'pnm',file=>'testout/linstretch.ppm')
28 || die "error in write()\n";
30 ok(unload_plugin($plug), "unload plugin")
31 || die "unable to unload plugin: $Imager::ERRSTR\n";
34 my $flines = "./flines.$Config{so}";
35 ok(load_plugin($flines), "load flines");
36 my $im = test_image();
37 ok($im->filter(type => "flines"), "do the flines test");
38 ok($im->write(file => "testout/flines.ppm"), "save flines result");
39 ok(unload_plugin($flines), "unload flines");
44 unless ($ENV{IMAGER_KEEP_FILES}) {
45 unlink "testout/linstretch.ppm";
46 unlink "testout/flines.ppm";
47 unlink "testout/t60dyntest.log";