![]() ![]() h, -help Show this help message and exit Rows How many rows to split the image into (horizontal split).Ĭols How many columns to split the image into (vertical split). Image_path The path to the image or directory with images to split. Will suppress all log messages (except errors and warnings) when running. Defaults to the current working directory. ![]() Set the output directory for image tiles (e.g. When working with large images (over 178,956,970 pixels), you may get an error. Split-image test.jpg 4 2 -load-large-images Will delete the original image after the process. Will split all images contained in the image_dir folder. ![]() They will be merged according to their file name: So, if you have these images in the current directory: Will attempt to merge similarly named image tiles to one image. The background color used to fill the square is determined from the image automatically. The -square arguments resizes the image into a square before splitting it. This splits the bridge.png image in 12 tiles ( 3 rows and 4 columns). This splits the cat.png image in 4 tiles ( 2 rows and 2 columns). split_image("bridge.jpg", 2, 2, True, False) Split-image is a Python package that you can use from the command line to split an image into tiles.įrom the command line: split-image image_path rows colsĪs a regular module import: from split_image import split_image split_image ( image_path, rows, cols, should_square, should_cleanup, ) # e.g. Quickly split an image into rows and columns (tiles).
0 Comments
Leave a Reply. |