


This split screen photo app allows you to design a photo collage by using the. It’s nice to know that such a simple program, with under 100 lines of code, is helping so many developers. Verdict: Its also possible to create a split-image composition by using PicsArt.
#Split photo into grid code#
One possible way is to use both x and y to generate a unique name.įollowing is a working code with all of the above-mentioned issues fixed. Recently, I was happily surprised to see that split-image, a Python package I published on PyPi, has 200+ downloads per month. Unique names are required for saving all the sub-images. The shape member of numpy array contains image height at first index and width at second index.Ī usual convention used for the naming convention is that M is the number of rows or height of the image while N is the number of columns or width of the image.Īnother problem is that not all the sub-images are being saved because names are assigned using y variable only which eventually overwrites the existing images due to repetition of y.

There is a bit of confusion which I guess is caused by how numpy handles image dimensions and coordinates using the (row, column) convention and how OpenCV handles them using (x, y) convention.
