title: PIL cannot write mode F to jpeg
body: <p>I am taking a jpg image and using numpy's fft2 to create/save a new image. However it throws this error </p>
  
  <pre><code>"IOError: cannot write mode F as JPEG" 
  </code></pre>
  
  <p>Is there an issue with CMYK and JPEG files in PIL???</p>
  
  <pre><code>p = Image.open('kibera.jpg')
  bw_p = p.convert('L')
  array_p = numpy.asarray(bw_p)
  fft_p = abs(numpy.fft.rfft2(array_p))
  new_p = Image.fromarray(fft_p)
  new_p.save('kibera0.jpg')
  new_p.histogram()
  </code></pre>