Debian Codegraph @

PKG-INFO

raw
1 Metadata-Version: 1.2
2 Name: piexif
3 Version: 1.1.3
4 Summary: To simplify exif manipulations with python. Writing, reading, and more...
5 Home-page: https://github.com/hMatoba/Piexif
6 Author: hMatoba
7 Author-email: [email protected]
8 License: MIT
9 Description: Piexif
10 ======
11
12 |Build Status| |Windows Build| |Coverage Status| |docs|
13
14
15 To simplify exif manipulations with Python. Writing, reading, and more... Piexif is pure Python. To everywhere with Python.
16
17
18 Document: http://piexif.readthedocs.org/en/latest/
19
20 Online demo: http://piexif-demo.appspot.com/demo
21
22 Install
23 -------
24
25 'easy_install'::
26
27 $ easy_install piexif
28
29 or 'pip'::
30
31 $ pip install piexif
32
33 or download .zip, extract it. Put 'piexif' directory into your environment.
34
35 Why Choose Piexif
36 -----------------
37
38 - Pure Python. So, it runs everywhere where Python runs.
39 - Easy exif manipulations. Read, write, remove...
40 - Documented. http://piexif.readthedocs.org/en/latest/
41
42 How to Use
43 ----------
44
45 There are only just five functions.
46
47 - *load(filename)* - Get exif data as *dict*.
48 - *dump(exif_dict)* - Get exif as *bytes*.
49 - *insert(exif_bytes, filename)* - Insert exif into JPEG, or WebP.
50 - *remove(filename)* - Remove exif from JPEG, or WebP.
51 - *transplant(filename, filename)* - Transplant exif from JPEG to JPEG.
52
53 Example
54 -------
55
56 ::
57
58 exif_dict = piexif.load("foo1.jpg")
59 for ifd in ("0th", "Exif", "GPS", "1st"):
60 for tag in exif_dict[ifd]:
61 print(piexif.TAGS[ifd][tag]["name"], exif_dict[ifd][tag])
62
63 With PIL(Pillow)
64 ----------------
65
66 ::
67
68 from PIL import Image
69 import piexif
70
71 im = Image.open(filename)
72 exif_dict = piexif.load(im.info["exif"])
73 # process im and exif_dict...
74 w, h = im.size
75 exif_dict["0th"][piexif.ImageIFD.XResolution] = (w, 1)
76 exif_dict["0th"][piexif.ImageIFD.YResolution] = (h, 1)
77 exif_bytes = piexif.dump(exif_dict)
78 im.save(new_file, "jpeg", exif=exif_bytes)
79
80 Environment
81 -----------
82
83 Tested on Python 2.7, 3.5+ and PyPy3. Piexif would run even on IronPython. Piexif is OS independent and can run on Google App Engine.
84
85 License
86 -------
87
88 This software is released under the MIT license, see LICENSE.txt.
89
90 .. |Build Status| image:: https://api.travis-ci.org/hMatoba/Piexif.svg?branch=master
91 :target: https://travis-ci.org/hMatoba/Piexif
92 .. |Windows Build| image:: https://ci.appveyor.com/api/projects/status/github/hMatoba/Piexif?branch=master&svg=true
93 :target: https://ci.appveyor.com/project/hMatoba/piexif
94 .. |Coverage Status| image:: https://coveralls.io/repos/hMatoba/Piexif/badge.svg?branch=master
95 :target: https://coveralls.io/r/hMatoba/Piexif?branch=master
96 .. |docs| image:: https://readthedocs.org/projects/piexif/badge/?version=latest
97 :target: https://readthedocs.org/projects/piexif/
98
99 Keywords: exif,jpeg
100 Platform: UNKNOWN
101 Classifier: Development Status :: 5 - Production/Stable
102 Classifier: Operating System :: OS Independent
103 Classifier: Programming Language :: Python :: 2
104 Classifier: Programming Language :: Python :: 2.7
105 Classifier: Programming Language :: Python :: 3
106 Classifier: Programming Language :: Python :: 3.5
107 Classifier: Programming Language :: Python :: 3.6
108 Classifier: Programming Language :: Python :: 3.7
109 Classifier: Programming Language :: Python :: Implementation :: CPython
110 Classifier: Programming Language :: Python :: Implementation :: IronPython
111 Classifier: Programming Language :: Python :: Implementation :: PyPy
112 Classifier: License :: OSI Approved :: MIT License
113 Classifier: Topic :: Multimedia
114 Classifier: Topic :: Printing
115 Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*