source: extensions/pLoader/trunk/src/Uploader/Image.pm @ 4779

Last change on this file since 4779 was 4779, checked in by ronosman, 14 years ago

Change copyright notice to add 2010.

  • Property svn:eol-style set to LF
File size: 2.2 KB
Line 
1# +-----------------------------------------------------------------------+
2# | pLoader - a Perl photo uploader for Piwigo                            |
3# +-----------------------------------------------------------------------+
4# | Copyright(C) 2008-2010 Piwigo Team                  http://piwigo.org |
5# +-----------------------------------------------------------------------+
6# | This program is free software; you can redistribute it and/or modify  |
7# | it under the terms of the GNU General Public License as published by  |
8# | the Free Software Foundation                                          |
9# |                                                                       |
10# | This program is distributed in the hope that it will be useful, but   |
11# | WITHOUT ANY WARRANTY; without even the implied warranty of            |
12# | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
13# | General Public License for more details.                              |
14# |                                                                       |
15# | You should have received a copy of the GNU General Public License     |
16# | along with this program; if not, write to the Free Software           |
17# | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
18# | USA.                                                                  |
19# +-----------------------------------------------------------------------+
20package Uploader::Image;
21use strict;
22use base qw/Uploader::Object/;
23
24__PACKAGE__->mk_accessors(
25    qw/
26        file
27        wx_thumb_file
28        site_high_file
29        site_name
30        site_resized_file
31        site_thumb_file
32        site_author
33        site_comment
34        exif_metadata
35        add_rank
36        site_categories
37        site_tags
38        file_sum
39                width
40                height
41                privacy_level
42    /
43);
44
45sub Init {
46    my ( $self ) = @_;
47
48}
49
50sub exif_tag {
51    my ( $self, $tag ) = @_;
52       
53    my $exif = $self->exif_metadata ;
54   
55    $exif->{$tag};     
56}
57
58sub create_date {
59    my ( $self, $date ) = @_;
60   
61    my $exif = $self->exif_metadata ;
62   
63    $self->{-create_date} ||= $exif->{CreateDate};
64       
65    $self->{-create_date} = $date if defined $date;
66
67        $self->{-create_date};
68}
69
70
71
721;
Note: See TracBrowser for help on using the repository browser.