I am working with a database of images with dimensions of 4000 x 3000 pixels, and I wish to slice each image in a directory based on a pixel size (1000 x 1000). I am using the glob
and image_slicer
modules currently, and am currently performing trial-and-error to get the images to the preferred pixel size.
import glob, os
import image_slicer
for file in glob.glob('~\\test_folder\\*.jpg'):
image_slicer.slice(file, 15)
A slice of 15 generates output photos with dimensions of 1000 x 750, which is close but still no cigar. Is there a way I can specify the specific dimensions?