New Upstream Snapshot - python-exif

Ready changes

Summary

Merged new upstream version: 3.0.0+git20220604.1.51d5c5a (was: 3.0.0).

Resulting package

Built on 2023-01-20T05:13 (took 4m59s)

The resulting binary packages can be installed (if you have the apt repository enabled) by running one of:

apt install -t fresh-snapshots python3-exifapt install -t fresh-snapshots python3-exifread

Lintian Result

Diff

diff --git a/.editorconfig b/.editorconfig
deleted file mode 100644
index 0ec7208..0000000
--- a/.editorconfig
+++ /dev/null
@@ -1,16 +0,0 @@
-# top-most EditorConfig file
-root = true
-
-[*]
-end_of_line = lf
-insert_final_newline = true
-
-# 4 space indentation
-[*.py]
-indent_style = space
-indent_size = 4
-
-# 2 space indentation
-[*.yml]
-indent_style = space
-indent_size = 2
diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml
deleted file mode 100644
index 73e37ed..0000000
--- a/.github/workflows/linting.yml
+++ /dev/null
@@ -1,43 +0,0 @@
-#
-# Run static code analysis.
-#
-name: Static Analysis
-
-on:
-  - push
-
-jobs:
-  static-check:
-    name: Run Static Analysis
-    runs-on: ubuntu-latest
-    strategy:
-      matrix:
-        python-version: ["3.8"]
-    steps:
-    - uses: actions/checkout@v2
-
-    - name: Set up Python ${{ matrix.python-version }}
-      uses: actions/setup-python@v2
-      with:
-        python-version: ${{ matrix.python-version }}
-
-    - name: Cache dependencies
-      uses: actions/cache@v2
-      with:
-        path: ~/.cache/pip
-        key: ${{ runner.os }}-dev-${{ hashFiles('setup.py') }}
-        restore-keys: |
-          ${{ runner.os }}-dev-
-
-    - name: Install dependencies
-      run: |
-        pip install virtualenv
-        make venv reqs-install
-
-    - name: Analysing the code with mypy
-      run: |
-        make mypy
-
-    - name: Analysing the code with pylint
-      run: |
-        make lint
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
deleted file mode 100644
index 3927b36..0000000
--- a/.github/workflows/test.yml
+++ /dev/null
@@ -1,54 +0,0 @@
-#
-# Run unit tests.
-#
-name: Test
-
-on:
-  - pull_request
-
-jobs:
-  pytest:
-    name: Run Tests
-    runs-on: ubuntu-latest
-    timeout-minutes: 30
-    strategy:
-      matrix:
-        python-version:
-          - "3.5"
-          - "3.6"
-          - "3.7"
-          - "3.8"
-          - "3.9"
-          - "3.10"
-    steps:
-    - uses: actions/checkout@v2
-
-    - name: Set up Python ${{ matrix.python-version }}
-      uses: actions/setup-python@v2
-      with:
-        python-version: ${{ matrix.python-version }}
-
-    - name: Cache dependencies
-      uses: actions/cache@v2
-      with:
-        path: ~/.cache/pip
-        key: ${{ runner.os }}-test-${{ hashFiles('setup.py') }}
-        restore-keys: |
-          ${{ runner.os }}-test-
-
-    - name: Download Samples
-      run: |
-        make samples-download
-
-    - name: Install
-      run: |
-        pip install -e .
-
-    - name: Run in debug and color mode
-      run: |
-        find exif-samples-master -name *.tiff -o -name *.jpg | xargs EXIF.py -dc
-
-    - name: Compare image processing output
-      run: |
-        find exif-samples-master -name *.tiff -o -name *.jpg | sort -f | xargs EXIF.py > exif-samples-master/dump_test
-        diff -Z --side-by-side --suppress-common-lines exif-samples-master/dump exif-samples-master/dump_test
diff --git a/.pylintrc b/.pylintrc
deleted file mode 100644
index baa6e84..0000000
--- a/.pylintrc
+++ /dev/null
@@ -1,498 +0,0 @@
-[MASTER]
-
-# A comma-separated list of package or module names from where C extensions may
-# be loaded. Extensions are loading into the active Python interpreter and may
-# run arbitrary code.
-extension-pkg-whitelist=
-
-# Add files or directories to the blacklist. They should be base names, not
-# paths.
-ignore=CVS
-
-# Add files or directories matching the regex patterns to the blacklist. The
-# regex matches against base names, not paths.
-ignore-patterns=
-
-# Python code to execute, usually for sys.path manipulation such as
-# pygtk.require().
-#init-hook=
-
-# Use multiple processes to speed up Pylint. Specifying 0 will auto-detect the
-# number of processors available to use.
-jobs=0
-
-# Control the amount of potential inferred values when inferring a single
-# object. This can help the performance when dealing with large functions or
-# complex, nested conditions.
-limit-inference-results=100
-
-# List of plugins (as comma separated values of python modules names) to load,
-# usually to register additional checkers.
-load-plugins=
-
-# Pickle collected data for later comparisons.
-persistent=yes
-
-# Specify a configuration file.
-#rcfile=
-
-# When enabled, pylint would attempt to guess common misconfiguration and emit
-# user-friendly hints instead of false-positive error messages.
-suggestion-mode=yes
-
-# Allow loading of arbitrary C extensions. Extensions are imported into the
-# active Python interpreter and may run arbitrary code.
-unsafe-load-any-extension=no
-
-
-[MESSAGES CONTROL]
-
-# Only show warnings with the listed confidence levels. Leave empty to show
-# all. Valid levels: HIGH, INFERENCE, INFERENCE_FAILURE, UNDEFINED.
-confidence=
-
-# Disable the message, report, category or checker with the given id(s). You
-# can either give multiple identifiers separated by comma (,) or put this
-# option multiple times (only on the command line, not in the configuration
-# file where it should appear only once). You can also use "--disable=all" to
-# disable everything first and then re-enable specific checks. For example, if
-# you want to run only the similarities checker, you can use "--disable=all
-# --enable=similarities". If you want to run only the classes checker, but have
-# no Warning level messages displayed, use "--disable=all --enable=classes
-# --disable=W".
-disable=missing-docstring,
-        duplicate-code,  # https://github.com/PyCQA/pylint/issues/214
-        # we should try to get rid of these at some point!
-        fixme,
-        consider-using-f-string,
-        too-many-arguments,
-        too-many-branches,
-
-# Enable the message, report, category or checker with the given id(s). You can
-# either give multiple identifier separated by comma (,) or put this option
-# multiple time (only on the command line, not in the configuration file where
-# it should appear only once). See also the "--disable" option for examples.
-enable=c-extension-no-member
-
-
-[REPORTS]
-
-# Python expression which should return a note less than 10 (10 is the highest
-# note). You have access to the variables errors warning, statement which
-# respectively contain the number of errors / warnings messages and the total
-# number of statements analyzed. This is used by the global evaluation report
-# (RP0004).
-evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
-
-# Template used to display messages. This is a python new-style format string
-# used to format the message information. See doc for all details.
-#msg-template=
-
-# Set the output format. Available formats are text, parseable, colorized, json
-# and msvs (visual studio). You can also give a reporter class, e.g.
-# mypackage.mymodule.MyReporterClass.
-output-format=text
-
-# Tells whether to display a full report or only the messages.
-reports=no
-
-# Activate the evaluation score.
-score=yes
-
-
-[REFACTORING]
-
-# Maximum number of nested blocks for function / method body
-max-nested-blocks=5
-
-# Complete name of functions that never returns. When checking for
-# inconsistent-return-statements if a never returning function is called then
-# it will be considered as an explicit return statement and no message will be
-# printed.
-never-returning-functions=sys.exit
-
-
-[MISCELLANEOUS]
-
-# List of note tags to take in consideration, separated by a comma.
-notes=FIXME,
-      XXX,
-      TODO
-
-
-[SPELLING]
-
-# Limits count of emitted suggestions for spelling mistakes.
-max-spelling-suggestions=4
-
-# Spelling dictionary name. Available dictionaries: none. To make it working
-# install python-enchant package..
-spelling-dict=
-
-# List of comma separated words that should not be checked.
-spelling-ignore-words=
-
-# A path to a file that contains private dictionary; one word per line.
-spelling-private-dict-file=
-
-# Tells whether to store unknown words to indicated private dictionary in
-# --spelling-private-dict-file option instead of raising a message.
-spelling-store-unknown-words=no
-
-
-[LOGGING]
-
-# Format style used to check logging format string. `old` means using %
-# formatting, while `new` is for `{}` formatting.
-logging-format-style=old
-
-# Logging modules to check that the string format arguments are in logging
-# function parameter format.
-logging-modules=logging
-
-
-[VARIABLES]
-
-# List of additional names supposed to be defined in builtins. Remember that
-# you should avoid defining new builtins when possible.
-additional-builtins=
-
-# Tells whether unused global variables should be treated as a violation.
-allow-global-unused-variables=yes
-
-# List of strings which can identify a callback function by name. A callback
-# name must start or end with one of those strings.
-callbacks=cb_,
-          _cb
-
-# A regular expression matching the name of dummy variables (i.e. expected to
-# not be used).
-dummy-variables-rgx=_+$|(_[a-zA-Z0-9_]*[a-zA-Z0-9]+?$)|dummy|^ignored_|^unused_
-
-# Argument names that match this expression will be ignored. Default to name
-# with leading underscore.
-ignored-argument-names=_.*|^ignored_|^unused_
-
-# Tells whether we should check for unused import in __init__ files.
-init-import=no
-
-# List of qualified module names which can have objects that can redefine
-# builtins.
-redefining-builtins-modules=six.moves,past.builtins,future.builtins,builtins,io
-
-
-[BASIC]
-
-# Naming style matching correct argument names.
-argument-naming-style=snake_case
-
-# Regular expression matching correct argument names. Overrides argument-
-# naming-style.
-#argument-rgx=
-
-# Naming style matching correct attribute names.
-attr-naming-style=snake_case
-
-# Regular expression matching correct attribute names. Overrides attr-naming-
-# style.
-#attr-rgx=
-
-# Bad variable names which should always be refused, separated by a comma.
-bad-names=foo,
-          bar,
-          baz,
-          toto,
-          tutu,
-          tata
-
-# Naming style matching correct class attribute names.
-class-attribute-naming-style=any
-
-# Regular expression matching correct class attribute names. Overrides class-
-# attribute-naming-style.
-#class-attribute-rgx=
-
-# Naming style matching correct class names.
-class-naming-style=PascalCase
-
-# Regular expression matching correct class names. Overrides class-naming-
-# style.
-#class-rgx=
-
-# Naming style matching correct constant names.
-const-naming-style=UPPER_CASE
-
-# Regular expression matching correct constant names. Overrides const-naming-
-# style.
-#const-rgx=
-
-# Minimum line length for functions/classes that require docstrings, shorter
-# ones are exempt.
-docstring-min-length=-1
-
-# Naming style matching correct function names.
-function-naming-style=snake_case
-
-# Regular expression matching correct function names. Overrides function-
-# naming-style.
-#function-rgx=
-
-# Good variable names which should always be accepted, separated by a comma.
-good-names=i,
-           s,
-           k,
-           ex,
-           Run,
-           _,
-           fh,
-
-# Include a hint for the correct naming format with invalid-name.
-include-naming-hint=no
-
-# Naming style matching correct inline iteration names.
-inlinevar-naming-style=any
-
-# Regular expression matching correct inline iteration names. Overrides
-# inlinevar-naming-style.
-#inlinevar-rgx=
-
-# Naming style matching correct method names.
-method-naming-style=snake_case
-
-# Regular expression matching correct method names. Overrides method-naming-
-# style.
-#method-rgx=
-
-# Naming style matching correct module names.
-module-naming-style=snake_case
-
-# Regular expression matching correct module names. Overrides module-naming-
-# style.
-#module-rgx=
-
-# Colon-delimited sets of names that determine each other's naming style when
-# the name regexes allow several styles.
-name-group=
-
-# Regular expression which should only match function or class names that do
-# not require a docstring.
-no-docstring-rgx=^_
-
-# List of decorators that produce properties, such as abc.abstractproperty. Add
-# to this list to register other decorators that produce valid properties.
-# These decorators are taken in consideration only for invalid-name.
-property-classes=abc.abstractproperty
-
-# Naming style matching correct variable names.
-variable-naming-style=snake_case
-
-# Regular expression matching correct variable names. Overrides variable-
-# naming-style.
-#variable-rgx=
-
-
-[TYPECHECK]
-
-# List of decorators that produce context managers, such as
-# contextlib.contextmanager. Add to this list to register other decorators that
-# produce valid context managers.
-contextmanager-decorators=contextlib.contextmanager
-
-# List of members which are set dynamically and missed by pylint inference
-# system, and so shouldn't trigger E1101 when accessed. Python regular
-# expressions are accepted.
-generated-members=
-
-# Tells whether missing members accessed in mixin class should be ignored. A
-# mixin class is detected if its name ends with "mixin" (case insensitive).
-ignore-mixin-members=yes
-
-# Tells whether to warn about missing members when the owner of the attribute
-# is inferred to be None.
-ignore-none=no
-
-# This flag controls whether pylint should warn about no-member and similar
-# checks whenever an opaque object is returned when inferring. The inference
-# can return multiple potential results while evaluating a Python object, but
-# some branches might not be evaluated, which results in partial inference. In
-# that case, it might be useful to still emit no-member and other checks for
-# the rest of the inferred objects.
-ignore-on-opaque-inference=yes
-
-# List of class names for which member attributes should not be checked (useful
-# for classes with dynamically set attributes). This supports the use of
-# qualified names.
-ignored-classes=optparse.Values,thread._local,_thread._local
-
-# List of module names for which member attributes should not be checked
-# (useful for modules/projects where namespaces are manipulated during runtime
-# and thus existing member attributes cannot be deduced by static analysis. It
-# supports qualified module names, as well as Unix pattern matching.
-ignored-modules=
-
-# Show a hint with possible names when a member name was not found. The aspect
-# of finding the hint is based on edit distance.
-missing-member-hint=yes
-
-# The minimum edit distance a name should have in order to be considered a
-# similar match for a missing member name.
-missing-member-hint-distance=1
-
-# The total number of similar names that should be taken in consideration when
-# showing a hint for a missing member.
-missing-member-max-choices=1
-
-
-[FORMAT]
-
-# Expected format of line ending, e.g. empty (any line ending), LF or CRLF.
-expected-line-ending-format=LF
-
-# Regexp for a line that is allowed to be longer than the limit.
-ignore-long-lines=^\s*(# )?<?https?://\S+>?$
-
-# Number of spaces of indent required inside a hanging or continued line.
-indent-after-paren=4
-
-# String used as indentation unit. This is usually "    " (4 spaces) or "\t" (1
-# tab).
-indent-string='    '
-
-# Maximum number of characters on a single line.
-max-line-length=120
-
-# Maximum number of lines in a module.
-max-module-lines=1000
-
-# List of optional constructs for which whitespace checking is disabled. `dict-
-# separator` is used to allow tabulation in dicts, etc.: {1  : 1,\n222: 2}.
-# `trailing-comma` allows a space between comma and closing bracket: (a, ).
-# `empty-line` allows space-only lines.
-no-space-check=trailing-comma,
-               dict-separator
-
-# Allow the body of a class to be on the same line as the declaration if body
-# contains single statement.
-single-line-class-stmt=no
-
-# Allow the body of an if to be on the same line as the test if there is no
-# else.
-single-line-if-stmt=no
-
-
-[SIMILARITIES]
-
-# Ignore comments when computing similarities.
-ignore-comments=yes
-
-# Ignore docstrings when computing similarities.
-ignore-docstrings=yes
-
-# Ignore imports when computing similarities.
-ignore-imports=no
-
-# Minimum lines number of a similarity.
-min-similarity-lines=4
-
-
-[STRING]
-
-# This flag controls whether the implicit-str-concat-in-sequence should
-# generate a warning on implicit string concatenation in sequences defined over
-# several lines.
-check-str-concat-over-line-jumps=no
-
-
-[CLASSES]
-
-# List of method names used to declare (i.e. assign) instance attributes.
-defining-attr-methods=__init__,
-                      __new__,
-
-# List of member names, which should be excluded from the protected access
-# warning.
-exclude-protected=_asdict,
-                  _fields,
-                  _replace,
-                  _source,
-                  _make
-
-# List of valid names for the first argument in a class method.
-valid-classmethod-first-arg=cls
-
-# List of valid names for the first argument in a metaclass class method.
-valid-metaclass-classmethod-first-arg=cls
-
-
-[IMPORTS]
-
-# Allow wildcard imports from modules that define __all__.
-allow-wildcard-with-all=no
-
-# Analyse import fallback blocks. This can be used to support both Python 2 and
-# 3 compatible code, which means that the block might have code that exists
-# only in one or another interpreter, leading to false positives when analysed.
-analyse-fallback-blocks=no
-
-# Deprecated modules which should not be used, separated by a comma.
-deprecated-modules=optparse,tkinter.tix
-
-# Create a graph of external dependencies in the given file (report RP0402 must
-# not be disabled).
-ext-import-graph=
-
-# Create a graph of every (i.e. internal and external) dependencies in the
-# given file (report RP0402 must not be disabled).
-import-graph=
-
-# Create a graph of internal dependencies in the given file (report RP0402 must
-# not be disabled).
-int-import-graph=
-
-# Force import order to recognize a module as part of the standard
-# compatibility libraries.
-known-standard-library=
-
-# Force import order to recognize a module as part of a third party library.
-known-third-party=enchant
-
-
-[DESIGN]
-
-# Maximum number of arguments for function / method.
-max-args=5
-
-# Maximum number of attributes for a class (see R0902).
-max-attributes=10
-
-# Maximum number of boolean expressions in an if statement.
-max-bool-expr=5
-
-# Maximum number of branch for function / method body.
-max-branches=10
-
-# Maximum number of locals for function / method body.
-max-locals=20
-
-# Maximum number of parents for a class (see R0901).
-max-parents=7
-
-# Maximum number of public methods for a class (see R0904).
-max-public-methods=20
-
-# Maximum number of return / yield for function / method body.
-max-returns=10
-
-# Maximum number of statements in function / method body.
-max-statements=50
-
-# Minimum number of public methods for a class (see R0903).
-min-public-methods=2
-
-
-[EXCEPTIONS]
-
-# Exceptions that will emit a warning when being caught. Defaults to
-# "BaseException, Exception".
-overgeneral-exceptions=BaseException,
-                       Exception
diff --git a/ExifRead.egg-info/PKG-INFO b/ExifRead.egg-info/PKG-INFO
new file mode 100644
index 0000000..84ec6f5
--- /dev/null
+++ b/ExifRead.egg-info/PKG-INFO
@@ -0,0 +1,226 @@
+Metadata-Version: 2.1
+Name: ExifRead
+Version: 3.0.0
+Summary: Read Exif metadata from tiff and jpeg files.
+Home-page: https://github.com/ianare/exif-py
+Author: Ianaré Sévi
+Author-email: ianare@gmail.com
+License: BSD
+Keywords: exif image metadata photo
+Classifier: Development Status :: 5 - Production/Stable
+Classifier: Environment :: Console
+Classifier: Intended Audience :: Developers
+Classifier: Intended Audience :: End Users/Desktop
+Classifier: License :: OSI Approved :: BSD License
+Classifier: Operating System :: OS Independent
+Classifier: Programming Language :: Python :: 3.5
+Classifier: Programming Language :: Python :: 3.6
+Classifier: Programming Language :: Python :: 3.7
+Classifier: Programming Language :: Python :: 3.8
+Classifier: Topic :: Utilities
+Provides-Extra: dev
+License-File: LICENSE.txt
+
+*******
+EXIF.py
+*******
+
+Easy to use Python module to extract Exif metadata from digital image files.
+
+Supported formats: TIFF, JPEG, PNG, Webp, HEIC
+
+
+Compatibility
+*************
+
+EXIF.py is tested and officially supported on Python 3.5 to 3.10
+
+Starting with version ``3.0.0``, Python2 compatibility is dropped *completely* (syntax errors due to type hinting).
+
+https://pythonclock.org/
+
+
+Installation
+************
+
+Stable Version
+==============
+The recommended process is to install the `PyPI package <https://pypi.python.org/pypi/ExifRead>`_,
+as it allows easily staying up to date::
+
+    $ pip install exifread
+
+See the `pip documentation <https://pip.pypa.io/en/latest/user_guide.html>`_ for more info.
+
+EXIF.py is mature software and strives for stability.
+
+Development Version
+===================
+
+After cloning the repo, use the provided Makefile::
+
+  make venv reqs-install
+
+Which will install a virtual environment and install development dependencies.
+
+Usage
+*****
+
+Command line
+============
+
+Some examples::
+
+    EXIF.py image1.jpg
+    EXIF.py -dc image1.jpg image2.tiff
+    find ~/Pictures -name "*.jpg" -o -name "*.tiff" | xargs EXIF.py
+
+Show command line options::
+
+    EXIF.py -h
+
+Python Script
+=============
+
+.. code-block:: python
+
+    import exifread
+    # Open image file for reading (must be in binary mode)
+    f = open(path_name, 'rb')
+
+    # Return Exif tags
+    tags = exifread.process_file(f)
+
+*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.
+You can process the tags as you wish. In particular, you can iterate through all the tags with:
+
+.. code-block:: python
+
+    for tag in tags.keys():
+        if tag not in ('JPEGThumbnail', 'TIFFThumbnail', 'Filename', 'EXIF MakerNote'):
+            print "Key: %s, value %s" % (tag, tags[tag])
+
+An ``if`` statement is used to avoid printing out a few of the tags that tend to be long or boring.
+
+The tags dictionary will include keys for all of the usual Exif tags, and will also include keys for
+Makernotes used by some cameras, for which we have a good specification.
+
+Note that the dictionary keys are the IFD name followed by the tag name. For example::
+
+    'EXIF DateTimeOriginal', 'Image Orientation', 'MakerNote FocusMode'
+
+
+Tag Descriptions
+****************
+
+Tags are divided into these main categories:
+
+- ``Image``: information related to the main image (IFD0 of the Exif data).
+- ``Thumbnail``: information related to the thumbnail image, if present (IFD1 of the Exif data).
+- ``EXIF``: Exif information (sub-IFD).
+- ``GPS``: GPS information (sub-IFD).
+- ``Interoperability``: Interoperability information (sub-IFD).
+- ``MakerNote``: Manufacturer specific information. There are no official published references for these tags.
+
+
+Processing Options
+******************
+
+These options can be used both in command line mode and within a script.
+
+Faster Processing
+=================
+
+Don't process makernote tags, don't extract the thumbnail image (if any).
+
+Pass the ``-q`` or ``--quick`` command line arguments, or as:
+
+.. code-block:: python
+
+    tags = exifread.process_file(f, 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)
+
+Stop at a Given Tag
+===================
+
+To stop processing the file after a specified tag is retrieved.
+
+Pass the ``-t TAG`` or ``--stop-tag TAG`` argument, or as:
+
+.. code-block:: python
+
+    tags = exifread.process_file(f, stop_tag='TAG')
+
+where ``TAG`` is a valid tag name, ex ``'DateTimeOriginal'``.
+
+*The two above options are useful to speed up processing of large numbers of files.*
+
+Strict Processing
+=================
+
+Return an error on invalid tags instead of silently ignoring.
+
+Pass the ``-s`` or ``--strict`` argument, or as:
+
+.. code-block:: python
+
+    tags = exifread.process_file(f, strict=True)
+
+Usage Example
+=============
+
+This example shows how to use the library to correct the orientation of an image
+(using Pillow for the transformation) before e.g. displaying it.
+
+.. code-block:: python
+
+    import exifread
+    from PIL import Image
+    import logging
+    
+    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)
+        if "Image Orientation" in tags.keys():
+            orientation = tags["Image Orientation"]
+            logging.basicConfig(level=logging.DEBUG)
+            logging.debug("Orientation: %s (%s)", orientation, orientation.values)
+            val = orientation.values
+            if 2 in val:
+                val += [4, 3]
+            if 5 in val:
+                val += [4, 6]
+            if 7 in val:
+                val += [4, 8]
+            if 3 in val:
+                logging.debug("Rotating by 180 degrees.")
+                im = im.transpose(Image.ROTATE_180)
+            if 4 in val:
+                logging.debug("Mirroring horizontally.")
+                im = im.transpose(Image.FLIP_TOP_BOTTOM)
+            if 6 in val:
+                logging.debug("Rotating by 270 degrees.")
+                im = im.transpose(Image.ROTATE_270)
+            if 8 in val:
+                logging.debug("Rotating by 90 degrees.")
+                im = im.transpose(Image.ROTATE_90)
+        return im
+
+Credit
+******
+
+A huge thanks to all the contributors over the years!
+
+Originally written by Gene Cash & Thierry Bousch.
diff --git a/ExifRead.egg-info/SOURCES.txt b/ExifRead.egg-info/SOURCES.txt
new file mode 100644
index 0000000..3ce68c2
--- /dev/null
+++ b/ExifRead.egg-info/SOURCES.txt
@@ -0,0 +1,29 @@
+CONTRIBUTING.rst
+ChangeLog.rst
+EXIF.py
+LICENSE.txt
+MANIFEST.in
+README.rst
+setup.py
+ExifRead.egg-info/PKG-INFO
+ExifRead.egg-info/SOURCES.txt
+ExifRead.egg-info/dependency_links.txt
+ExifRead.egg-info/requires.txt
+ExifRead.egg-info/top_level.txt
+exifread/__init__.py
+exifread/classes.py
+exifread/exceptions.py
+exifread/exif_log.py
+exifread/heic.py
+exifread/jpeg.py
+exifread/utils.py
+exifread/tags/__init__.py
+exifread/tags/exif.py
+exifread/tags/makernote/__init__.py
+exifread/tags/makernote/apple.py
+exifread/tags/makernote/canon.py
+exifread/tags/makernote/casio.py
+exifread/tags/makernote/dji.py
+exifread/tags/makernote/fujifilm.py
+exifread/tags/makernote/nikon.py
+exifread/tags/makernote/olympus.py
\ No newline at end of file
diff --git a/ExifRead.egg-info/dependency_links.txt b/ExifRead.egg-info/dependency_links.txt
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/ExifRead.egg-info/dependency_links.txt
@@ -0,0 +1 @@
+
diff --git a/ExifRead.egg-info/requires.txt b/ExifRead.egg-info/requires.txt
new file mode 100644
index 0000000..7402ec6
--- /dev/null
+++ b/ExifRead.egg-info/requires.txt
@@ -0,0 +1,4 @@
+
+[dev]
+mypy==0.950
+pylint==2.13.8
diff --git a/ExifRead.egg-info/top_level.txt b/ExifRead.egg-info/top_level.txt
new file mode 100644
index 0000000..0e65e81
--- /dev/null
+++ b/ExifRead.egg-info/top_level.txt
@@ -0,0 +1 @@
+exifread
diff --git a/Makefile b/Makefile
deleted file mode 100644
index 49f4ef5..0000000
--- a/Makefile
+++ /dev/null
@@ -1,55 +0,0 @@
-
-ifneq (,$(wildcard /.dockerenv))
-	PYTHON_BIN := /usr/local/bin/python3
-	PIP_BIN := /usr/local/bin/pip3
-	PYLINT_BIN := ~/.local/bin/pylint
-	MYPY_BIN := ~/.local/bin/mypy
-	TWINE_BIN := ~/.local/bin/twine
-	PIP_INSTALL := $(PIP_BIN) install --progress-bar=off --user
-else
-	VENV_DIR := ./.venv
-	PYTHON_BIN := $(VENV_DIR)/bin/python3
-	PIP_BIN := $(VENV_DIR)/bin/pip3
-	PYLINT_BIN := $(VENV_DIR)/bin/pylint
-	MYPY_BIN := $(VENV_DIR)/bin/mypy
-	TWINE_BIN := $(VENV_DIR)/bin/twine
-	PIP_INSTALL := $(PIP_BIN) install --progress-bar=off
-endif
-
-.PHONY: help
-all: help
-
-venv: ## Set up the virtual environment
-	virtualenv -p python3 $(VENV_DIR)
-
-lint: ## Run linting (pylint)
-	$(PYLINT_BIN) -f colorized ./exifread
-
-mypy: ## Run mypy
-	$(MYPY_BIN) --show-error-context ./exifread ./EXIF.py
-
-#test: ## Run all tests
-#	$(PYTHON_BIN) -m unittest discover -v -s ./tests
-
-analyze: lint mypy ## Run all static analysis tools
-
-reqs-install: ## Install with all requirements
-	$(PIP_INSTALL) .[dev]
-
-samples-download: ## Install sample files used for testing.
-	wget https://github.com/ianare/exif-samples/archive/master.tar.gz
-	tar -xzf master.tar.gz
-
-build:  ## build distribution
-	rm -fr ./dist
-	$(PYTHON_BIN) setup.py sdist
-
-publish: build ## Publish to PyPI
-	$(TWINE_BIN) upload --repository testpypi dist/*
-
-help: Makefile
-	@echo
-	@echo "Choose a command to run:"
-	@echo
-	@grep --no-filename -E '^[a-zA-Z_%-]+:.*?## .*$$' Makefile | sort | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-30s\033[0m %s\n", $$1, $$2}'
-	@echo 
diff --git a/PKG-INFO b/PKG-INFO
new file mode 100644
index 0000000..84ec6f5
--- /dev/null
+++ b/PKG-INFO
@@ -0,0 +1,226 @@
+Metadata-Version: 2.1
+Name: ExifRead
+Version: 3.0.0
+Summary: Read Exif metadata from tiff and jpeg files.
+Home-page: https://github.com/ianare/exif-py
+Author: Ianaré Sévi
+Author-email: ianare@gmail.com
+License: BSD
+Keywords: exif image metadata photo
+Classifier: Development Status :: 5 - Production/Stable
+Classifier: Environment :: Console
+Classifier: Intended Audience :: Developers
+Classifier: Intended Audience :: End Users/Desktop
+Classifier: License :: OSI Approved :: BSD License
+Classifier: Operating System :: OS Independent
+Classifier: Programming Language :: Python :: 3.5
+Classifier: Programming Language :: Python :: 3.6
+Classifier: Programming Language :: Python :: 3.7
+Classifier: Programming Language :: Python :: 3.8
+Classifier: Topic :: Utilities
+Provides-Extra: dev
+License-File: LICENSE.txt
+
+*******
+EXIF.py
+*******
+
+Easy to use Python module to extract Exif metadata from digital image files.
+
+Supported formats: TIFF, JPEG, PNG, Webp, HEIC
+
+
+Compatibility
+*************
+
+EXIF.py is tested and officially supported on Python 3.5 to 3.10
+
+Starting with version ``3.0.0``, Python2 compatibility is dropped *completely* (syntax errors due to type hinting).
+
+https://pythonclock.org/
+
+
+Installation
+************
+
+Stable Version
+==============
+The recommended process is to install the `PyPI package <https://pypi.python.org/pypi/ExifRead>`_,
+as it allows easily staying up to date::
+
+    $ pip install exifread
+
+See the `pip documentation <https://pip.pypa.io/en/latest/user_guide.html>`_ for more info.
+
+EXIF.py is mature software and strives for stability.
+
+Development Version
+===================
+
+After cloning the repo, use the provided Makefile::
+
+  make venv reqs-install
+
+Which will install a virtual environment and install development dependencies.
+
+Usage
+*****
+
+Command line
+============
+
+Some examples::
+
+    EXIF.py image1.jpg
+    EXIF.py -dc image1.jpg image2.tiff
+    find ~/Pictures -name "*.jpg" -o -name "*.tiff" | xargs EXIF.py
+
+Show command line options::
+
+    EXIF.py -h
+
+Python Script
+=============
+
+.. code-block:: python
+
+    import exifread
+    # Open image file for reading (must be in binary mode)
+    f = open(path_name, 'rb')
+
+    # Return Exif tags
+    tags = exifread.process_file(f)
+
+*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.
+You can process the tags as you wish. In particular, you can iterate through all the tags with:
+
+.. code-block:: python
+
+    for tag in tags.keys():
+        if tag not in ('JPEGThumbnail', 'TIFFThumbnail', 'Filename', 'EXIF MakerNote'):
+            print "Key: %s, value %s" % (tag, tags[tag])
+
+An ``if`` statement is used to avoid printing out a few of the tags that tend to be long or boring.
+
+The tags dictionary will include keys for all of the usual Exif tags, and will also include keys for
+Makernotes used by some cameras, for which we have a good specification.
+
+Note that the dictionary keys are the IFD name followed by the tag name. For example::
+
+    'EXIF DateTimeOriginal', 'Image Orientation', 'MakerNote FocusMode'
+
+
+Tag Descriptions
+****************
+
+Tags are divided into these main categories:
+
+- ``Image``: information related to the main image (IFD0 of the Exif data).
+- ``Thumbnail``: information related to the thumbnail image, if present (IFD1 of the Exif data).
+- ``EXIF``: Exif information (sub-IFD).
+- ``GPS``: GPS information (sub-IFD).
+- ``Interoperability``: Interoperability information (sub-IFD).
+- ``MakerNote``: Manufacturer specific information. There are no official published references for these tags.
+
+
+Processing Options
+******************
+
+These options can be used both in command line mode and within a script.
+
+Faster Processing
+=================
+
+Don't process makernote tags, don't extract the thumbnail image (if any).
+
+Pass the ``-q`` or ``--quick`` command line arguments, or as:
+
+.. code-block:: python
+
+    tags = exifread.process_file(f, 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)
+
+Stop at a Given Tag
+===================
+
+To stop processing the file after a specified tag is retrieved.
+
+Pass the ``-t TAG`` or ``--stop-tag TAG`` argument, or as:
+
+.. code-block:: python
+
+    tags = exifread.process_file(f, stop_tag='TAG')
+
+where ``TAG`` is a valid tag name, ex ``'DateTimeOriginal'``.
+
+*The two above options are useful to speed up processing of large numbers of files.*
+
+Strict Processing
+=================
+
+Return an error on invalid tags instead of silently ignoring.
+
+Pass the ``-s`` or ``--strict`` argument, or as:
+
+.. code-block:: python
+
+    tags = exifread.process_file(f, strict=True)
+
+Usage Example
+=============
+
+This example shows how to use the library to correct the orientation of an image
+(using Pillow for the transformation) before e.g. displaying it.
+
+.. code-block:: python
+
+    import exifread
+    from PIL import Image
+    import logging
+    
+    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)
+        if "Image Orientation" in tags.keys():
+            orientation = tags["Image Orientation"]
+            logging.basicConfig(level=logging.DEBUG)
+            logging.debug("Orientation: %s (%s)", orientation, orientation.values)
+            val = orientation.values
+            if 2 in val:
+                val += [4, 3]
+            if 5 in val:
+                val += [4, 6]
+            if 7 in val:
+                val += [4, 8]
+            if 3 in val:
+                logging.debug("Rotating by 180 degrees.")
+                im = im.transpose(Image.ROTATE_180)
+            if 4 in val:
+                logging.debug("Mirroring horizontally.")
+                im = im.transpose(Image.FLIP_TOP_BOTTOM)
+            if 6 in val:
+                logging.debug("Rotating by 270 degrees.")
+                im = im.transpose(Image.ROTATE_270)
+            if 8 in val:
+                logging.debug("Rotating by 90 degrees.")
+                im = im.transpose(Image.ROTATE_90)
+        return im
+
+Credit
+******
+
+A huge thanks to all the contributors over the years!
+
+Originally written by Gene Cash & Thierry Bousch.
diff --git a/README.rst b/README.rst
index fcffd9d..f7adcaa 100644
--- a/README.rst
+++ b/README.rst
@@ -121,6 +121,12 @@ Pass the ``-q`` or ``--quick`` command line arguments, or as:
 
     tags = exifread.process_file(f, 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)
+
 Stop at a Given Tag
 ===================
 
diff --git a/debian/changelog b/debian/changelog
index fabd201..4c40443 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+python-exif (3.0.0+git20220604.1.51d5c5a-1) UNRELEASED; urgency=low
+
+  * New upstream snapshot.
+
+ -- Debian Janitor <janitor@jelmer.uk>  Fri, 20 Jan 2023 05:09:22 -0000
+
 python-exif (3.0.0-1) unstable; urgency=medium
 
   [ Diego M. Rodriguez ]
diff --git a/exifread/__init__.py b/exifread/__init__.py
index 4399f37..6e9cb57 100644
--- a/exifread/__init__.py
+++ b/exifread/__init__.py
@@ -122,7 +122,7 @@ def _determine_type(fh: BinaryIO) -> tuple:
 
 def process_file(fh: BinaryIO, stop_tag=DEFAULT_STOP_TAG,
                  details=True, strict=False, debug=False,
-                 truncate_tags=True, auto_seek=True):
+                 truncate_tags=True, auto_seek=True, extract_thumbnail=True):
     """
     Process an image file (expects an open file object).
 
@@ -179,7 +179,7 @@ def process_file(fh: BinaryIO, stop_tag=DEFAULT_STOP_TAG,
         hdr.decode_maker_note()
 
     # extract thumbnails
-    if details and thumb_ifd:
+    if details and thumb_ifd and extract_thumbnail:
         hdr.extract_tiff_thumbnail(thumb_ifd)
         hdr.extract_jpeg_thumbnail()
 
diff --git a/exifread/classes.py b/exifread/classes.py
index 3b8550a..e9113f5 100644
--- a/exifread/classes.py
+++ b/exifread/classes.py
@@ -496,7 +496,14 @@ class ExifHeader:
             self.dump_ifd(0, 'MakerNote', tag_dict=makernote.apple.TAGS)
             self.offset = offset
             return
-
+        
+        if make == 'DJI':
+            offset = self.offset
+            self.offset += note.field_offset
+            self.dump_ifd(0, 'MakerNote', tag_dict=makernote.dji.TAGS)
+            self.offset = offset
+            return
+        
         # Canon
         if make == 'Canon':
             self.dump_ifd(note.field_offset, 'MakerNote',
diff --git a/exifread/tags/__init__.py b/exifread/tags/__init__.py
index f5cd095..502371b 100644
--- a/exifread/tags/__init__.py
+++ b/exifread/tags/__init__.py
@@ -4,7 +4,7 @@ Tag definitions
 
 from exifread.tags.exif import EXIF_TAGS
 from exifread.tags.makernote import (
-    apple, canon, casio, fujifilm, nikon, olympus,
+    apple, canon, casio, fujifilm, nikon, olympus, dji
 )
 
 DEFAULT_STOP_TAG = 'UNDEF'
diff --git a/exifread/tags/makernote/dji.py b/exifread/tags/makernote/dji.py
new file mode 100644
index 0000000..e0170f4
--- /dev/null
+++ b/exifread/tags/makernote/dji.py
@@ -0,0 +1,17 @@
+"""
+Makernote (proprietary) tag definitions for DJI cameras
+
+Based on https://github.com/exiftool/exiftool/blob/master/lib/Image/ExifTool/DJI.pm
+"""
+
+TAGS = {
+    0x03: ('SpeedX', ),
+    0x04: ('SpeedY', ),
+    0x05: ('SpeedZ', ),
+    0x06: ('Pitch', ),
+    0x07: ('Yaw', ),
+    0x08: ('Roll', ),
+    0x09: ('CameraPitch', ),
+    0x0a: ('CameraYaw', ),
+    0x0b: ('CameraRoll', ),
+}
diff --git a/setup.cfg b/setup.cfg
new file mode 100644
index 0000000..8bfd5a1
--- /dev/null
+++ b/setup.cfg
@@ -0,0 +1,4 @@
+[egg_info]
+tag_build = 
+tag_date = 0
+

Debdiff

[The following lists of changes regard files as different if they have different names, permissions or owners.]

Files in second set of .debs but not in first

-rw-r--r--  root/root   /usr/lib/python3/dist-packages/exifread/tags/makernote/dji.py

No differences were encountered between the control files of package python3-exif

No differences were encountered between the control files of package python3-exifread

More details

Full run details