title: Convert Color Spaces in Pillow / PIL
body: <p>Right now I am converting an image from <code>YCrCb</code> to <code>RGB</code> using OpenCV:</p>
  
  <pre><code>cv2.cvtColor(arr, cv2.COLOR_YCR_CB2RGB)
  </code></pre>
  
  <p>Is there a function in Pillow / PIL to perform this same color conversion. At the very least I would like to perform the color conversion without needing OpenCV.</p>
  
  <p>I tried the following:</p>
  
  <pre><code>def _rgb( xxx ):
      y, cb, cr = xxx
      r = y                          + 1.402   * ( cr - 128 )
      g = y -  .34414 * ( cb - 128 ) -  .71414 * ( cr - 128 )
      b = y + 1.772   * ( cb - 128 )
      return r, g, b
  
  np.apply_along_axis( _rgb, 2, arr.astype( np.float32 ) ).astype( np.uint8 )
  </code></pre>
  
  <p>and it is very slow and does not quite work.</p>