line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# mamgal - a program for creating static image galleries |
2
|
|
|
|
|
|
|
# Copyright 2009 Marcin Owsiany |
3
|
|
|
|
|
|
|
# See the README file for license information |
4
|
|
|
|
|
|
|
# A wrapper class for the Image::Info library. |
5
|
|
|
|
|
|
|
package App::MaMGal::ImageInfo::ImageInfo; |
6
|
1
|
|
|
1
|
|
6
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
40
|
|
7
|
1
|
|
|
1
|
|
7
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
31
|
|
8
|
1
|
|
|
1
|
|
7
|
use base 'App::MaMGal::ImageInfo::Base'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
645
|
|
9
|
1
|
|
|
1
|
|
6
|
use Carp; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
69
|
|
10
|
|
|
|
|
|
|
|
11
|
1
|
|
|
1
|
|
875
|
use Image::Info; |
|
1
|
|
|
|
|
1658
|
|
|
1
|
|
|
|
|
220
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub get_info |
14
|
|
|
|
|
|
|
{ |
15
|
109
|
|
|
109
|
0
|
114
|
my $self = shift; |
16
|
109
|
|
|
|
|
111
|
my $file = shift; |
17
|
109
|
|
|
|
|
236
|
my $info = Image::Info::image_info($file); |
18
|
109
|
100
|
|
|
|
483030
|
croak $info->{error} if exists $info->{error}; |
19
|
108
|
|
|
|
|
400
|
return $info; |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub datetime_original_string |
23
|
|
|
|
|
|
|
{ |
24
|
19
|
|
|
19
|
0
|
371
|
my $self = shift; |
25
|
19
|
|
|
|
|
77
|
$self->{info}->{DateTimeOriginal}; |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub datetime_digitized_string |
29
|
|
|
|
|
|
|
{ |
30
|
17
|
|
|
17
|
0
|
388
|
my $self = shift; |
31
|
17
|
|
|
|
|
66
|
$self->{info}->{DateTimeDigitized}; |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
sub datetime_string |
35
|
|
|
|
|
|
|
{ |
36
|
13
|
|
|
13
|
0
|
312
|
my $self = shift; |
37
|
13
|
|
|
|
|
47
|
$self->{info}->{DateTime}; |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
sub description |
41
|
|
|
|
|
|
|
{ |
42
|
6
|
|
|
6
|
0
|
354
|
my $self = shift; |
43
|
6
|
|
|
|
|
34
|
$self->{info}->{Comment}; |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
1; |