line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# -*- perl -*- |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
# Copyright (C) 2015 Slaven Rezic. All rights reserved. |
4
|
|
|
|
|
|
|
# This package is free software; you can redistribute it and/or |
5
|
|
|
|
|
|
|
# modify it under the same terms as Perl itself. |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
package Imager::Image::Xbm; |
8
|
|
|
|
|
|
|
|
9
|
1
|
|
|
1
|
|
475
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
70
|
|
10
|
1
|
|
|
1
|
|
4
|
use vars qw($VERSION); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
63
|
|
11
|
|
|
|
|
|
|
$VERSION = '0.01'; |
12
|
|
|
|
|
|
|
|
13
|
1
|
|
|
1
|
|
6
|
use base 'Imager::Image::Base'; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
92
|
|
14
|
|
|
|
|
|
|
|
15
|
1
|
|
|
1
|
|
480
|
use Image::Xbm; |
|
1
|
|
|
|
|
2231
|
|
|
1
|
|
|
|
|
89
|
|
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub new { |
18
|
1
|
|
|
1
|
0
|
1639
|
my($class, %opts) = @_; |
19
|
1
|
|
|
|
|
2
|
my $file = delete $opts{file}; |
20
|
1
|
50
|
|
|
|
6
|
die 'file option is mandatory' if !defined $file; |
21
|
1
|
50
|
|
|
|
18
|
die 'Unhandled options: ' . join(' ', %opts) if %opts; |
22
|
1
|
|
|
|
|
9
|
my $xbm = Image::Xbm->new(-file => $file); |
23
|
1
|
|
|
|
|
388
|
$class->convert($xbm); |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
1; |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
__END__ |