I am taking a jpg image and using numpy\'s fft2 to create/save a new image. However it throws this error
\"IOError: cannot write mode F as JPEG\" >
\"IOError: cannot write mode F as JPEG\"
Try convert the image to RGB:
... new_p = Image.fromarray(fft_p) if new_p.mode != 'RGB': new_p = new_p.convert('RGB') ...