Create a function that will split an image into N pieces.