Skip to content

Commit

Permalink
prepare next version
Browse files Browse the repository at this point in the history
  • Loading branch information
ianare committed May 3, 2023
1 parent e6efa14 commit 04efa3f
Show file tree
Hide file tree
Showing 7 changed files with 70 additions and 29 deletions.
34 changes: 23 additions & 11 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

# OS
.directory
.DS_Store

# Images
*.jpg
Expand Down Expand Up @@ -30,6 +31,7 @@ MANIFEST

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
.coverage
Expand All @@ -39,20 +41,30 @@ exif-samples*
# Translations
*.mo

# Mr Developer
.mr.developer.cfg

# PyCharm
# IDE
.vscode/
.idea

# Eclipse
.mr.developer.cfg
.project
.pydevproject
.settings

# Misc
*swp
# Temp files
*.swp
*-swp

# Environments
.env
.venv
.venv*
env/
venv/
ENV/
env.bak/
venv.bak/

# Venv
/venv
/.venv
# mypy
.mypy_cache/
.mypy_cache
.dmypy.json
dmypy.json
14 changes: 11 additions & 3 deletions ChangeLog.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
**********
Change Log
**********
EXIF.py Change Log
##################

3.1.0 — 2023-05-??
* Add DJI makernotes, extract_thumbnail parameter (#168) by Piero Toffanin
* Fix endianess bug while reading DJI makernotes, add Make tag (#169) by Piero Toffanin
* Make CI pass (#178) by Nick Dimitroff
* update pylint and mypy
* fix webp for file conversion by magick (#132) by Marcelo
* Ignore unknown parsers, fix for #160 (#175) by Herbert Poul
* Allow extracting thumbnails with details=False (#170)

3.0.0 — 2022-05-08
* **BREAKING CHANGE:** Add type hints, which removes Python2 compatibility
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

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

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ reqs-install: ## Install with all requirements
$(PIP_INSTALL) .[dev]

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

Expand Down
43 changes: 30 additions & 13 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -62,18 +62,19 @@ Python Script
.. code-block:: python
import exifread
# Open image file for reading (must be in binary mode)
f = open(path_name, 'rb')
with open(file_path, "rb") as file_handle:
# Return Exif tags
tags = exifread.process_file(f)
# Return Exif tags
tags = exifread.process_file(file_handle)
*Note:* To use this library in your project as a Git submodule, you should::

from <submodule_folder> import exifread

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

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

.. code-block:: python
tags = exifread.process_file(f, details=False)
tags = exifread.process_file(file_handle, details=False)
To process makernotes only, without extracting the thumbnail image (if any):

.. code-block:: python
tags = exifread.process_file(f, details=True, extract_thumbnail=False)
tags = exifread.process_file(file_handle, details=True, extract_thumbnail=False)
To extract the thumbnail image (if any), without processing makernotes:

.. code-block:: python
tags = exifread.process_file(file_handle, details=False, extract_thumbnail=True)
Stop at a Given Tag
===================
Expand All @@ -136,7 +143,7 @@ Pass the ``-t TAG`` or ``--stop-tag TAG`` argument, or as:

.. code-block:: python
tags = exifread.process_file(f, stop_tag='TAG')
tags = exifread.process_file(file_handle, stop_tag='TAG')
where ``TAG`` is a valid tag name, ex ``'DateTimeOriginal'``.

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

.. code-block:: python
tags = exifread.process_file(f, strict=True)
tags = exifread.process_file(file_handle, strict=True)
Usage Example
=============
Expand All @@ -168,8 +175,9 @@ This example shows how to use the library to correct the orientation of an image
def _read_img_and_correct_exif_orientation(path):
im = Image.open(path)
tags = {}
with open(path, 'rb') as f:
tags = exifread.process_file(f, details=False)
with open(path, "rb") as file_handle:
tags = exifread.process_file(file_handle, details=False)
if "Image Orientation" in tags.keys():
orientation = tags["Image Orientation"]
logging.basicConfig(level=logging.DEBUG)
Expand All @@ -195,9 +203,18 @@ This example shows how to use the library to correct the orientation of an image
im = im.transpose(Image.ROTATE_90)
return im
Credit
******
A huge thanks to all the contributors over the years!
License
*******

Copyright © 2002-2007 Gene Cash

Copyright © 2007-2023 Ianaré Sévi and contributors

A **huge** thanks to all the contributors over the years!

Originally written by Gene Cash & Thierry Bousch.

Available as open source under the terms of the **BSD-3-Clause license**.

See LICENSE.txt file for details.
2 changes: 1 addition & 1 deletion exifread/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from exifread.jpeg import find_jpeg_exif
from exifread.exceptions import InvalidExif, ExifNotFound

__version__ = '3.0.0'
__version__ = '3.1.0'

logger = get_logger()

Expand Down
3 changes: 3 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Topic :: Utilities",
],
extras_require={
Expand Down

0 comments on commit 04efa3f

Please sign in to comment.