Picture cutter is a small python program that takes an image file or a directory to a set of image files, and segment them according to a specified dimension. Useful for making webtoon panels out of a long strip of image or making tiles for instagram etc.
- Specify the input file
################# CONFIGURATIONS #####################
# output directories
inputdir = join("input", "example-image.jpg") # can be a file or a directory
- Specify the size of segments
# cut dimensions
dim = (200, 200) # (width, height), image will be cut from left to right, top to bottom
- Run the script. Output will be stored in output/folderName_timestamp.
folderName can be customized at line 49:
# create output folder
outdirname = "SEGMENTS_%.0f" % time()
and individual segment image file name can be customized at line 63:
saved_location = "panel%d.jpg" % cut
This program requires PIL. I installed it in a conda environment, which you can get from the Anaconda distribution.