42 lines
1.0 KiB
Python
42 lines
1.0 KiB
Python
"""
|
|
This type stub file was generated by pyright.
|
|
"""
|
|
|
|
class UserComment:
|
|
ASCII = ...
|
|
JIS = ...
|
|
UNICODE = ...
|
|
ENCODINGS = ...
|
|
_JIS = ...
|
|
_UNICODE = ...
|
|
_PREFIX_SIZE = ...
|
|
_ASCII_PREFIX = ...
|
|
_JIS_PREFIX = ...
|
|
_UNICODE_PREFIX = ...
|
|
_UNDEFINED_PREFIX = ...
|
|
@classmethod
|
|
def load(cls, data):
|
|
"""
|
|
Convert "UserComment" value in exif format to str.
|
|
|
|
:param bytes data: "UserComment" value from exif
|
|
:return: u"foobar"
|
|
:rtype: str(Unicode)
|
|
:raises: ValueError if the data does not conform to the EXIF specification,
|
|
or the encoding is unsupported.
|
|
"""
|
|
...
|
|
|
|
@classmethod
|
|
def dump(cls, data, encoding=...):
|
|
"""
|
|
Convert str to appropriate format for "UserComment".
|
|
|
|
:param data: Like u"foobar"
|
|
:param str encoding: "ascii", "jis", or "unicode"
|
|
:return: b"ASCII\x00\x00\x00foobar"
|
|
:rtype: bytes
|
|
:raises: ValueError if the encoding is unsupported.
|
|
"""
|
|
...
|