1 Imager::init("log"=>'testout/t68map.log');
3 use Imager qw(:all :handy);
7 my $imbase = Imager::ImgRaw::new(200,300,3);
10 @map1 = map { int($_/2) } 0..255;
11 @map2 = map { 255-int($_/2) } 0..255;
18 i_map($imbase, [ [], [], \@map1 ]);
19 print "ok ".$tst++."\n";
20 i_map($imbase, [ \@map1, \@map1, \@map1 ]);
22 print "ok ".$tst++."\n";
23 i_map($imbase, [ \@map1, \@map2, \@map3 ]);
25 print "ok ".$tst++."\n";
26 i_map($imbase, [ \@maps, \@mapl, \@map3 ]);
28 # test the highlevel interface
29 # currently this requires visual inspection of the output files
33 if ($im->read(file=>'testimg/scale.ppm')) {
34 print( ( $im->map(red=>\@map1, green=>\@map2, blue=>\@map3) ? "ok " : "not ok ").$tst++."\n" );
35 print( ( $im->map(maps=>[\@map1, [], \@map2]) ? "ok " : "not ok "). $tst++."\n");
38 die "could not load testout/scale.ppm\n";