stefmolin / exif-stripper

An easy-to-use tool to ensure image metadata (EXIF data and extended attributes) is removed.
https://pypi.org/project/exif-stripper/
Apache License 2.0
15 stars 5 forks source link
exif exif-metadata metadata-remover pre-commit-hook xattr
exif-stripper logo
Last Release PyPI release Supported Python Versions License
Build status codecov CI
Downloads PyPI downloads

exif-stripper

An easy-to-use tool to ensure image metadata (EXIF data and extended attributes) is removed. Read more about why this is important here.

Usage

Pre-commit hook

Add the following to your .pre-commit-config.yaml file:

- repo: https://github.com/stefmolin/exif-stripper
  rev: 0.5.0
  hooks:
    - id: strip-exif

Be sure to check out the pre-commit documentation for additional configuration options.

Command line

First, install the exif-stripper package from PyPI:

$ python -m pip install exif-stripper

Then, use the strip-exif entry point on the file(s) of your choice:

$ strip-exif /path/to/file [/path/to/another/file]

Run strip-exif --help for more information.

Python

First, install the exif-stripper package from PyPI:

$ python -m pip install exif-stripper

Then, use the process_image() function on individual files (returns True if the file was altered and False otherwise):

from exif_stripper import process_image
process_image('/path/to/image')

Note: This requires version 0.4.0 or above.

Contributing

Please consult the contributing guidelines.