-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #41 from hMatoba/dev
Ver 1.0.13
- Loading branch information
Showing
15 changed files
with
408 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
================ | ||
Helper Functions | ||
================ | ||
|
||
UserComment | ||
----------- | ||
.. py:function:: piexif.helper.UserComment.load(data) | ||
Convert "UserComment" value in exif format to str. | ||
|
||
:param bytes data: "UserComment" value from exif | ||
:return: u"foobar" | ||
:rtype: str(Unicode) | ||
|
||
:: | ||
|
||
import piexif | ||
import piexif.helper | ||
exif_dict = piexif.load("foo.jpg") | ||
user_comment = piexif.helper.UserComment.load(exif_dict["Exif"][piexif.ExifIFD.UserComment]) | ||
|
||
.. py:function:: piexif.helper.UserComment.dump(data, encoding="ascii") | ||
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 | ||
|
||
:: | ||
|
||
import piexif | ||
import piexif.helper | ||
user_comment = piexif.helper.UserComment.dump(u"Edit now.") | ||
exif_dict = piexif.load("foo.jpg") | ||
exif_dict["Exif"][piexif.ExifIFD.UserComment] = user_comment | ||
exif_bytes = piexif.dump(exif_dict) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.