Skip to content

Commit

Permalink
[doc] update doc for read_*_detail()
Browse files Browse the repository at this point in the history
  • Loading branch information
LeoHsiao1 committed Jul 8, 2024
1 parent 94dc830 commit 7667356
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 4 additions & 1 deletion docs/Tutorial-cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,11 @@ class Image:
def get_access_mode (self) -> dict

def read_exif (self, encoding='utf-8') -> dict
def read_exif_detail(self, encoding='utf-8') -> dict
def read_iptc (self, encoding='utf-8') -> dict
def read_iptc_detail(self, encoding='utf-8') -> dict
def read_xmp (self, encoding='utf-8') -> dict
def read_xmp_detail (self, encoding='utf-8') -> dict
def read_raw_xmp (self, encoding='utf-8') -> str
def read_comment (self, encoding='utf-8') -> str
def read_icc (self) -> bytes
Expand Down Expand Up @@ -150,7 +153,7 @@ __exiv2_version__ = '0.28.3'
{'Xmp.dc.format': 'image/jpeg', 'Xmp.dc.rights': 'lang="x-default" TEST', 'Xmp.dc.subject': 'TEST', ...}
>>> img.close()
```

- 上例只读取元数据的 `tag``value` 。你可以调用 `img.read_xx_detail()` 获取更多信息,包括 `typeName``tagDesc``tagLabel`
- 读取元数据的速度与元数据的数量成反比,不管图片的大小如何。
- 调用 `img.read_*()` 是安全的。这些方法永远不会影响图片文件(md5不变)。
- 读取 XMP 元数据时,空白字符 `\v` 和 `\f` 会被替换为空格 ` ` 。
Expand Down
4 changes: 4 additions & 0 deletions docs/Tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,11 @@ class Image:
def get_access_mode (self) -> dict

def read_exif (self, encoding='utf-8') -> dict
def read_exif_detail(self, encoding='utf-8') -> dict
def read_iptc (self, encoding='utf-8') -> dict
def read_iptc_detail(self, encoding='utf-8') -> dict
def read_xmp (self, encoding='utf-8') -> dict
def read_xmp_detail (self, encoding='utf-8') -> dict
def read_raw_xmp (self, encoding='utf-8') -> str
def read_comment (self, encoding='utf-8') -> str
def read_icc (self) -> bytes
Expand Down Expand Up @@ -150,6 +153,7 @@ __exiv2_version__ = '0.28.3'
{'Xmp.dc.format': 'image/jpeg', 'Xmp.dc.rights': 'lang="x-default" TEST', 'Xmp.dc.subject': 'TEST', ...}
>>> img.close()
```
- The above example only reads the `tag` and `value` of the metadata. You can call `img.read_xx_detail()` to get more information, including `typeName`, `tagDesc`, `tagLabel`.
- The speed of reading metadata is inversely proportional to the amount of metadata, regardless of the size of the image.
- It is safe to call `img.read_*()`. These methods never affect image files (md5 unchanged).
- When reading XMP metadata, the whitespace characters `\v` and `\f` are replaced with the space ` `.
Expand Down

0 comments on commit 7667356

Please sign in to comment.