~osomon/pyexiv2/pyexiv2-0.3

« back to all changes in this revision

Viewing changes to src/pyexiv2.py

  • Committer: Olivier Tilloy
  • Date: 2009-07-21 20:00:11 UTC
  • Revision ID: olivier@tilloy.net-20090721200011-97hnb0w1a0kycuso
Improved documentation.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1353
1353
            raise KeyError(key)
1354
1354
 
1355
1355
    def _set_exif_tag(self, tag):
 
1356
        # Set an EXIF tag. If the tag already exists, its value is overwritten.
1356
1357
        if type(tag) is not ExifTag:
1357
1358
            raise TypeError('Expecting an ExifTag')
1358
1359
        self._image.setExifTagValue(tag.key, tag.to_string())
1372
1373
        self._image.setExifTagValue(key, value)
1373
1374
 
1374
1375
    def _set_iptc_tag(self, tag):
 
1376
        # Set an IPTC tag. If the tag already exists, its values are
 
1377
        # overwritten.
1375
1378
        if type(tag) is not IptcTag:
1376
1379
            raise TypeError('Expecting an IptcTag')
1377
1380
        self._image.setIptcTagValues(tag.key, tag.to_string())
1395
1398
        self._image.setIptcTagValues(key, values)
1396
1399
 
1397
1400
    def _set_xmp_tag(self, tag):
 
1401
        # Set an XMP tag. If the tag already exists, its value is overwritten.
1398
1402
        if type(tag) is not XmpTag:
1399
1403
            raise TypeError('Expecting an XmpTag')
1400
1404
        self._image.setXmpTagValue(tag.key, tag.to_string())