source: extras/pLoader/trunk/src/Uploader/Image.pm @ 3226

Last change on this file since 3226 was 3226, checked in by ronosman, 15 years ago

Change how pLoader identifies images : now use md5 checksum - feature 961
Fix filename with accentuated characters causing processing failures - bug 952

  • Property svn:eol-style set to LF
File size: 2.1 KB
Line 
1# +-----------------------------------------------------------------------+
2# | pLoader - a Perl photo uploader for Piwigo                            |
3# +-----------------------------------------------------------------------+
4# | Copyright(C) 2008      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        preview_file
29        site_high_file
30        site_name
31        site_resized_file
32        site_thumb_file
33        site_author
34        site_comment
35        exif_metadata
36        add_rank
37        site_categories
38        site_tags
39        preview_w
40        preview_h
41        file_sum
42    /
43);
44
45sub Init {
46    my ( $self ) = @_;
47}
48
49sub exif_tag {
50    my ( $self, $tag ) = @_;
51       
52    my $exif = $self->exif_metadata ;
53   
54    $exif->{$tag};     
55}
56
57sub create_date {
58    my ( $self ) = @_;
59   
60    my $exif = $self->exif_metadata ;
61   
62    $exif->{CreateDate};       
63}
64
65
66
671;
Note: See TracBrowser for help on using the repository browser.