]> git.imager.perl.org - imager.git/blob - t/t65crop.t
added has_chars() method to Imager::Font::FreeType2
[imager.git] / t / t65crop.t
1 BEGIN { $| = 1; print "1..3\n"; }
2 END {print "not ok 1\n" unless $loaded;}
3 use Imager;
4
5 $loaded = 1;
6
7 #$Imager::DEBUG=1;
8
9 Imager::init('log'=>'testout/t65crop.log');
10
11 $img=Imager->new() || die "unable to create image object\n";
12
13 print "ok 1\n";
14
15 $img->open(file=>'testimg/scale.ppm',type=>'pnm');
16
17 sub skip { 
18     print $_[0];
19     print "ok 2 # skip\n";
20     print "ok 3 # skip\n";
21     exit(0);
22 }
23
24
25 $nimg=$img->crop(top=>10, left=>10, bottom=>25, right=>25)
26             or skip ( "\# warning ".$img->{'ERRSTR'}."\n" );
27
28 #       xopcodes=>[qw( x y Add)],yopcodes=>[qw( x y Sub)],parm=>[]
29
30 print "ok 2\n";
31 $nimg->write(type=>'pnm',file=>'testout/t65.ppm') || die "error in write()\n";
32
33 print "ok 3\n";