~ubuntu-branches/ubuntu/utopic/lazygal/utopic

« back to all changes in this revision

Viewing changes to lazygal/genmedia.py

  • Committer: Package Import Robot
  • Author(s): Michal Čihař
  • Date: 2011-11-30 09:24:25 UTC
  • mfrom: (1.2.9)
  • Revision ID: package-import@ubuntu.com-20111130092425-2jim1l762xdmorz7
Tags: 0.7.1-1
* New upstream release.
  - Patch was merged upstream. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
167
167
        'Exif.GPSInfo.GPSDestLatitude',
168
168
    )
169
169
 
170
 
    def save(self, im):
171
 
        super(ImageOtherSize, self).save(im)
172
 
 
173
 
        # Copy exif tags to reduced img
174
 
 
 
170
    def copy_metadata(self):
175
171
        imgtags = pyexiv2.ImageMetadata(self.source_media.path)
176
172
        imgtags.read()
177
173
        dest_imgtags = pyexiv2.ImageMetadata(self.path)
198
194
        except ValueError, e:
199
195
            logging.error(_("Could not copy metadata in reduced picture: %s") % e)
200
196
 
 
197
    def save(self, im):
 
198
        super(ImageOtherSize, self).save(im)
 
199
 
 
200
        if self.webgal.config.getboolean('webgal', 'publish-metadata'):
 
201
            self.copy_metadata()
 
202
 
201
203
 
202
204
class VideoThumb(ResizedImage):
203
205