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
|
|
4
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
20
|
|
7
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
39
|
|
8
|
1
|
|
|
1
|
|
4
|
use base 'App::MaMGal::ImageInfo::Base'; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
500
|
|
9
|
1
|
|
|
1
|
|
4
|
use Carp; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
43
|
|
10
|
|
|
|
|
|
|
|
11
|
1
|
|
|
1
|
|
707
|
use Image::Info; |
|
1
|
|
|
|
|
1384
|
|
|
1
|
|
|
|
|
228
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub get_info |
14
|
|
|
|
|
|
|
{ |
15
|
109
|
|
|
109
|
0
|
131
|
my $self = shift; |
16
|
109
|
|
|
|
|
151
|
my $file = shift; |
17
|
109
|
|
|
|
|
252
|
my $info = Image::Info::image_info($file); |
18
|
109
|
100
|
|
|
|
467991
|
croak $info->{error} if exists $info->{error}; |
19
|
108
|
|
|
|
|
364
|
return $info; |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub datetime_original_string |
23
|
|
|
|
|
|
|
{ |
24
|
19
|
|
|
19
|
0
|
331
|
my $self = shift; |
25
|
19
|
|
|
|
|
69
|
$self->{info}->{DateTimeOriginal}; |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub datetime_digitized_string |
29
|
|
|
|
|
|
|
{ |
30
|
17
|
|
|
17
|
0
|
391
|
my $self = shift; |
31
|
17
|
|
|
|
|
56
|
$self->{info}->{DateTimeDigitized}; |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
sub datetime_string |
35
|
|
|
|
|
|
|
{ |
36
|
13
|
|
|
13
|
0
|
346
|
my $self = shift; |
37
|
13
|
|
|
|
|
46
|
$self->{info}->{DateTime}; |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
sub description |
41
|
|
|
|
|
|
|
{ |
42
|
6
|
|
|
6
|
0
|
337
|
my $self = shift; |
43
|
6
|
|
|
|
|
28
|
$self->{info}->{Comment}; |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
1; |