~osomon/pyexiv2/pyexiv2-0.3

« back to all changes in this revision

Viewing changes to src/exiv2wrapper.cpp

  • Committer: Olivier Tilloy
  • Date: 2010-12-19 23:41:38 UTC
  • mto: This revision was merged to the branch mainline in revision 345.
  • Revision ID: olivier@tilloy.net-20101219234138-uk34lyu81w1ngyqf
Added an iptc_charset property to the ImageMetadata class,
to get, set and delete the (optional) IPTC charset.

Show diffs side-by-side

added added

removed removed

Lines of Context:
518
518
    _getExifThumbnail()->setJpegThumbnail(buffer, data.size());
519
519
}
520
520
 
 
521
const std::string Image::getIptcCharset() const
 
522
{
 
523
    CHECK_METADATA_READ
 
524
    const char* charset = _iptcData->detectCharset();
 
525
    if (charset != 0)
 
526
    {
 
527
        return std::string(charset);
 
528
    }
 
529
    else
 
530
    {
 
531
        return std::string();
 
532
    }
 
533
}
 
534
 
521
535
 
522
536
ExifTag::ExifTag(const std::string& key,
523
537
                 Exiv2::Exifdatum* datum, Exiv2::ExifData* data,