File: bmp.t

package info (click to toggle)
libimage-info-perl 1.28-1
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd, lenny, squeeze, wheezy
  • size: 568 kB
  • ctags: 193
  • sloc: perl: 4,152; makefile: 46
file content (34 lines) | stat: -rw-r--r-- 803 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/usr/bin/perl -w

use Test::More;
use strict;

# test RLE encoded bitmaps

BEGIN
   {
   plan tests => 10;
   chdir 't' if -d 't';
   use lib '../lib';
   use lib '../blib';
   use_ok ("Image::Info") or die($@);
   };

use Image::Info qw(image_info dim);

my $i = image_info("../img/test.rle")
 || die ("Couldn't read test.rle: $!");

#use Data::Dumper; print Dumper($i), "\n";

is ($i->{Compression}, 'RLE8', 'Compression');
is ($i->{BitsPerSample}, '8', 'BitsPerSample');
is ($i->{SamplesPerPixel}, 1, 'SamplesPerPixel');

is ($i->{file_media_type}, 'image/bmp', 'image/bmp');
is ($i->{BMP_ColorsImportant}, 255, '255 colors');
is ($i->{ColorTableSize}, 255, '255 colors');
is ($i->{BMP_Origin}, 1, 'BMP_Origin');
is ($i->{color_type}, 'Indexed-RGB', 'color_type');

is (dim($i), '64x64', 'dim()');