envato / exiv2

A simple wrapper around exiv2
MIT License
25 stars 17 forks source link

Exiv2::Value subtypes support #9

Open gogiel opened 10 years ago

gogiel commented 10 years ago

It should be possible to read and write Value using subtypes, especially XmpValue and its subtypes. Or at least provide access for value_ fields (http://www.exiv2.org/doc/classExiv2_1_1XmpArrayValue.html#620cf5acd40bea72c7b3cdb3894fea6a, http://www.exiv2.org/doc/classExiv2_1_1LangAltValue.html#e466310e854d707c1e5f5a44730a27c9 and others).

If you don't want to break current interface my idea is to add singleton method to the string object that represents Exiv2::Value that will return value_ field if available.

gogiel commented 9 years ago

Exemplary implementation: https://github.com/gogiel/exiv2/commit/35cadeb325bd9e4f7ff5a54ca4a9a2cd4c314440 By the way spec image with description "Pregnant woman shown in nudity." is at least surprising ;)