diff options
author | Olivier Tilloy <olivier@tilloy.net> | 2010-03-17 00:27:00 +0100 |
---|---|---|
committer | Olivier Tilloy <olivier@tilloy.net> | 2010-03-17 00:27:00 +0100 |
commit | a9c2f0a1c0f2269df202d49f2b89cba8d2fe7ec2 (patch) | |
tree | 51298ca4f249518eac33280a6015ea49bf3f955c | |
parent | 58b3fa68f1583f5041b92b2594c0a2b2c19bbdb5 (diff) | |
download | pyexiv2-a9c2f0a1c0f2269df202d49f2b89cba8d2fe7ec2.tar.gz |
Updated API documentation.
-rw-r--r-- | doc/api.rst | 5 | ||||
-rw-r--r-- | src/pyexiv2/metadata.py | 16 |
2 files changed, 11 insertions, 10 deletions
diff --git a/doc/api.rst b/doc/api.rst index 3a26568..9703fca 100644 --- a/doc/api.rst +++ b/doc/api.rst @@ -15,8 +15,9 @@ pyexiv2.metadata .. module:: pyexiv2.metadata .. autoclass:: ImageMetadata - :members: read, write, dimensions, mime_type, exif_keys, iptc_keys, - xmp_keys, __getitem__, __setitem__, __delitem__, previews, copy + :members: from_buffer, read, write, dimensions, mime_type, exif_keys, + iptc_keys, xmp_keys, __getitem__, __setitem__, __delitem__, + previews, copy, buffer pyexiv2.exif ############ diff --git a/src/pyexiv2/metadata.py b/src/pyexiv2/metadata.py index f337554..fc36568 100644 --- a/src/pyexiv2/metadata.py +++ b/src/pyexiv2/metadata.py @@ -69,15 +69,15 @@ class ImageMetadata(object): return libexiv2python._Image(filename) @classmethod - def from_buffer(cls, data): + def from_buffer(cls, buffer): """ - Instantiate an image container from a data buffer. + Instantiate an image container from an image buffer. - :param data: a buffer containing image data - :type data: string + :param buffer: a buffer containing image data + :type buffer: string """ obj = cls(None) - obj._image = libexiv2python._Image(data, len(data)) + obj._image = libexiv2python._Image(buffer, len(buffer)) return obj def read(self): @@ -390,9 +390,9 @@ class ImageMetadata(object): @property def buffer(self): """ - The image data as a string. - If metadata has been modified, the data buffer won't be up-to-date until - write() has been called. + The image buffer as a string. + If metadata has been modified, the data won't be up-to-date until + :meth:`.write` has been called. """ return self._image._getDataBuffer() |