A Python script to read the EXIF data from an image file and extract the shutter count of a DSLR camera.
This script is designed to work with Nikon D850, D810, and D800 camera models. Other models can be added easily in the main class. The script uses the exifread
library to parse the EXIF data from the image file and extract the shutter count. Check out the exifread documentation for more information on how EXIF data is parsed.
- Extracts the shutter count from the EXIF data of an image file
- Supports Nikon D850, D810, and D800 camera models
- Can output the shutter count as an integer or a string
- Provides error handling for invalid image files, unsupported camera models, and other issues
- Ensure you have Python 3 installed. You can download it from the official Python website
- Install the required
exifread
library using thepip
command. Official documentation
$ pip install exifread
Clone or download the Shutter Counter repository to your local machine.
$ git clone https://gitlab.com/thaikolja/python-shutter-counter.git
Click here to download the latest version.
To use the script, simply run it from the command line and provide the path to the image file as an argument:
$ python main.py /path/to/image.jpg
This will output the shutter count as a string:
Shutter count: 78684
You can also specify the output type as an integer by adding the int
argument:
$ python main.py /path/to/image.jpg int
This will output the shutter count as an integer:
78684
Check out the Python documentation for more information on running Python scripts from the command line.
Pull requests are welcome! If you'd like to contribute to the project, please fork the repository and submit a pull request with your changes. Make sure to include a clear description of your changes and any relevant testing or documentation updates. Check out this guide for more information on pull requests.
To test the script, simply run it with a valid image file and verify that the output is correct. You can also test the script with invalid image files or unsupported camera models to ensure that it handles errors correctly.
This project is licensed under the MIT License. For details, see the LICENSE file. For more information on the MIT License, check out the Open Source Initiative.
- Kolja Nolte kolja.nolte@gmail.com