Python script which allows to slice image into pieces