refactor: improve image handling by transitioning from NumPy arrays to PIL images in cropping functions