useful for converting images to squares