]> git.imager.perl.org - imager.git/blob - t/t90cc.t
3aeef9a12cadf3e7e3b538e1a3aac179a2f66811
[imager.git] / t / t90cc.t
1 #!perl -w
2 use strict;
3 use Test::More tests => 4;
4
5 use Imager;
6
7 Imager::init('log'=>'testout/t90cc.log');
8
9 my $img=Imager->new();
10 ok($img->open(file=>'testimg/scale.ppm'), 'load test image')
11   or print "failed: ",$img->{ERRSTR},"\n";
12
13 ok(defined($img->getcolorcount(maxcolors=>10000)), 'check color count is small enough');
14 print "# color count: ".$img->getcolorcount()."\n";
15 is($img->getcolorcount(), 86, 'expected number of colors');
16 is($img->getcolorcount(maxcolors => 50), undef, 'check overflow handling');