Skip to content

Commit 05fe609

Browse files
committed
prepare next version
1 parent e6efa14 commit 05fe609

File tree

7 files changed

+71
-29
lines changed

7 files changed

+71
-29
lines changed

.gitignore

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
# OS
44
.directory
5+
.DS_Store
6+
57

68
# Images
79
*.jpg
@@ -30,6 +32,7 @@ MANIFEST
3032

3133
# Installer logs
3234
pip-log.txt
35+
pip-delete-this-directory.txt
3336

3437
# Unit test / coverage reports
3538
.coverage
@@ -39,20 +42,30 @@ exif-samples*
3942
# Translations
4043
*.mo
4144

42-
# Mr Developer
43-
.mr.developer.cfg
44-
45-
# PyCharm
45+
# IDE
46+
.vscode/
4647
.idea
47-
48-
# Eclipse
48+
.mr.developer.cfg
4949
.project
5050
.pydevproject
5151
.settings
5252

53-
# Misc
54-
*swp
53+
# Temp files
54+
*.swp
55+
*-swp
56+
57+
# Environments
58+
.env
59+
.venv
60+
.venv*
61+
env/
62+
venv/
63+
ENV/
64+
env.bak/
65+
venv.bak/
5566

56-
# Venv
57-
/venv
58-
/.venv
67+
# mypy
68+
.mypy_cache/
69+
.mypy_cache
70+
.dmypy.json
71+
dmypy.json

ChangeLog.rst

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
1-
**********
2-
Change Log
3-
**********
1+
EXIF.py Change Log
2+
##################
3+
4+
3.1.0 — 2023-05-??
5+
* Add DJI makernotes, extract_thumbnail parameter (#168) by Piero Toffanin
6+
* Fix endianess bug while reading DJI makernotes, add Make tag (#169) by Piero Toffanin
7+
* Make CI pass (#178) by Nick Dimitroff
8+
* update pylint and mypy
9+
* fix webp for file conversion by magick (#132) by Marcelo
10+
* Ignore unknown parsers, fix for #160 (#175) by Herbert Poul
11+
* Allow extracting thumbnails with details=False (#170)
412

513
3.0.0 — 2022-05-08
614
* **BREAKING CHANGE:** Add type hints, which removes Python2 compatibility

LICENSE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
Copyright (c) 2002-2007 Gene Cash
3-
Copyright (c) 2007-2021 Ianaré Sévi and contributors
3+
Copyright (c) 2007-2023 Ianaré Sévi and contributors
44

55
Redistribution and use in source and binary forms, with or without
66
modification, are permitted provided that the following conditions

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ reqs-install: ## Install with all requirements
3737
$(PIP_INSTALL) .[dev]
3838

3939
samples-download: ## Install sample files used for testing.
40+
rm -fr master.tar.gz exif-samples-master
4041
wget https://github.com/ianare/exif-samples/archive/master.tar.gz
4142
tar -xzf master.tar.gz
4243

README.rst

Lines changed: 30 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -62,18 +62,19 @@ Python Script
6262
.. code-block:: python
6363
6464
import exifread
65+
6566
# Open image file for reading (must be in binary mode)
66-
f = open(path_name, 'rb')
67+
with open(file_path, "rb") as file_handle:
6768
68-
# Return Exif tags
69-
tags = exifread.process_file(f)
69+
# Return Exif tags
70+
tags = exifread.process_file(file_handle)
7071
7172
*Note:* To use this library in your project as a Git submodule, you should::
7273

7374
from <submodule_folder> import exifread
7475

7576
Returned tags will be a dictionary mapping names of Exif tags to their
76-
values in the file named by path_name.
77+
values in the file named by ``file_path``.
7778
You can process the tags as you wish. In particular, you can iterate through all the tags with:
7879

7980
.. code-block:: python
@@ -119,13 +120,19 @@ Pass the ``-q`` or ``--quick`` command line arguments, or as:
119120

120121
.. code-block:: python
121122
122-
tags = exifread.process_file(f, details=False)
123+
tags = exifread.process_file(file_handle, details=False)
123124
124125
To process makernotes only, without extracting the thumbnail image (if any):
125126

126127
.. code-block:: python
127128
128-
tags = exifread.process_file(f, details=True, extract_thumbnail=False)
129+
tags = exifread.process_file(file_handle, details=True, extract_thumbnail=False)
130+
131+
To extract the thumbnail image (if any), without processing makernotes:
132+
133+
.. code-block:: python
134+
135+
tags = exifread.process_file(file_handle, details=False, extract_thumbnail=True)
129136
130137
Stop at a Given Tag
131138
===================
@@ -136,7 +143,7 @@ Pass the ``-t TAG`` or ``--stop-tag TAG`` argument, or as:
136143

137144
.. code-block:: python
138145
139-
tags = exifread.process_file(f, stop_tag='TAG')
146+
tags = exifread.process_file(file_handle, stop_tag='TAG')
140147
141148
where ``TAG`` is a valid tag name, ex ``'DateTimeOriginal'``.
142149

@@ -151,7 +158,7 @@ Pass the ``-s`` or ``--strict`` argument, or as:
151158

152159
.. code-block:: python
153160
154-
tags = exifread.process_file(f, strict=True)
161+
tags = exifread.process_file(file_handle, strict=True)
155162
156163
Usage Example
157164
=============
@@ -168,8 +175,9 @@ This example shows how to use the library to correct the orientation of an image
168175
def _read_img_and_correct_exif_orientation(path):
169176
im = Image.open(path)
170177
tags = {}
171-
with open(path, 'rb') as f:
172-
tags = exifread.process_file(f, details=False)
178+
with open(path, "rb") as file_handle:
179+
tags = exifread.process_file(file_handle, details=False)
180+
173181
if "Image Orientation" in tags.keys():
174182
orientation = tags["Image Orientation"]
175183
logging.basicConfig(level=logging.DEBUG)
@@ -195,9 +203,18 @@ This example shows how to use the library to correct the orientation of an image
195203
im = im.transpose(Image.ROTATE_90)
196204
return im
197205
198-
Credit
199-
******
200206
201-
A huge thanks to all the contributors over the years!
207+
License
208+
*******
209+
210+
Copyright © 2002-2007 Gene Cash
211+
212+
Copyright © 2007-2023 Ianaré Sévi and contributors
213+
214+
A **huge** thanks to all the contributors over the years!
202215

203216
Originally written by Gene Cash & Thierry Bousch.
217+
218+
Available as open source under the terms of the **BSD-3-Clause license**.
219+
220+
See LICENSE.txt file for details.

exifread/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
from exifread.jpeg import find_jpeg_exif
1414
from exifread.exceptions import InvalidExif, ExifNotFound
1515

16-
__version__ = '3.0.0'
16+
__version__ = '3.1.0'
1717

1818
logger = get_logger()
1919

setup.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@
3131
"Programming Language :: Python :: 3.6",
3232
"Programming Language :: Python :: 3.7",
3333
"Programming Language :: Python :: 3.8",
34+
"Programming Language :: Python :: 3.9",
35+
"Programming Language :: Python :: 3.10",
36+
"Programming Language :: Python :: 3.11",
3437
"Topic :: Utilities",
3538
],
3639
extras_require={

0 commit comments

Comments
 (0)