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

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

Feature 1554 added : use caption as prefix.

  • 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        site_original_filename
35        exif_metadata
36        add_rank
37        site_categories
38        site_tags
39        file_sum
40                width
41                height
42                privacy_level
43        caption
44    /
45);
46
47sub Init {
48    my ( $self ) = @_;
49
50}
51
52sub exif_tag {
53    my ( $self, $tag ) = @_;
54       
55    my $exif = $self->exif_metadata ;
56   
57    $exif->{$tag};     
58}
59
60sub create_date {
61    my ( $self, $date ) = @_;
62   
63    my $exif = $self->exif_metadata ;
64   
65    $self->{-create_date} ||= $exif->{CreateDate};
66       
67    $self->{-create_date} = $date if defined $date;
68
69        $self->{-create_date};
70}
71
72
73
741;
Note: See TracBrowser for help on using the repository browser.