Skip to content

Latest commit

 

History

History
55 lines (39 loc) · 2.01 KB

README.md

File metadata and controls

55 lines (39 loc) · 2.01 KB

ImageSlicer

A small tool for slicing images into smaller pieces.

Example

Function "bysize"

main.py

import ImageSlicer
ImageSlicer.bysize("example.jpg", 2000, 2000, output_folder="sliced_by_size", keep_end_sections=True)

Function for slicing images by size

  1. Input file
  2. width of the new images
  3. height of the new images
  4. output path (optional)
  5. If you want to keep the end section, which are normally smaller (optional)


Function "bynumber"

import ImageSlicer
ImageSlicer.bynumber("example.jpg", 2, 2, output_folder="sliced_by_number", keep_end_sections=True)

Function to slice images by number of parts you want to have so if the input is 10,10 you will get 100 images (depending if you want wo keep the smaller parts or not).

  1. Input file
  2. number of images horizontal
  3. number of images vertical
  4. output path (optional)
  5. If you want to keep the end section, which are normally smaller (optional)



Python 3.5+
Tested: Linux


Creative Commons License
These images are licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.