Curious how to batch process
mutemute opened this issue · comments
Doing a time lapse project and it outputs a ton of images. I tried "python3 examples/utility.py image%04d" and "*.jpg" but it always errors out.. I appreciate your work and your reply.
If you take a look at the utility.py file it's a fairly simple script that just takes the input filepath as a string into the RPICAM2DNG class and converts.
So you could do something like this in your own script, just add your folder where the images are:
from pydng.core import RPICAM2DNG
import os
def files(path):
for file in os.listdir(path):
if os.path.isfile(os.path.join(path, file)):
if ".jpg" in file:
yield os.path.join(path, file)
for file in files("YOUR/DIRECTORY/HERE"):
RPICAM2DNG().convert(file)