title: error from function CGDataProviderCopyData : JPEGDecompressSurface : Picture decode failed: e00002c2
body: <p>I have error "JPEGDecompressSurface : Picture decode failed: e00002c2" in my console thrown from the function CGDataProviderCopyData, when I try to get pixels from GCImage. Despite this, everything works as expected, but I would like to get rid of this error and understand what could be wrong. 
  I don't how to get to the bottom what is wrong. Will be grateful for any ideas.</p>
  
  <p>The code:</p>
  
  <pre><code>NSData* nsData = [NSData dataWithBytes:inBuffer length:inBufferSize];
  UIImage* image = [UIImage imageWithData: nsData]; // looks good in debugger
  CGImageRef imageRef = [image CGImage];
  CGDataProviderRef refData = CGImageGetDataProvider(imageRef);
  CFDataRef pixels = CGDataProviderCopyData(refData); // error appears in the console
  </code></pre>
  
  <p>Thanks!</p>