Mri Image Processing Python Pillow