A simple Python script to convert CR2 photos to JPG and retain timestamps.
- Recursively walk through folders, convert and maintain folder structure
- Copy files that are no raw images
- Detect existing files and ignore them
- Archive mode: Recursively copy only CR2-files into archive
- Clone or download
- Install required packages with
pip install
- Set permissions to execute
chmod +x cr2-to-jpg.py
- Run the script and pass source and destination folders, for example:
./cr2-to-jpg.py ~/Desktop/raw ~/Desktop/converted
This script runs best on python3.5+
although it may work on python3.x
as well.
Script requires the following packages:
rawkit
from https://pypi.python.org/pypi/rawkit/0.5.0numpy
from https://pypi.python.org/pypi/numpyPIL
from https://pypi.python.org/pypi/Pillow
These are now set in requirements.txt for easier install.
It also requiers libraw
to be installed. In order for rawkit to work properly you may have to downgrade to libraw16
.
Thank you to @mateusz-michalik, who created the original script I forked.