title: Getting view snapshot without alpha of view applied
body: <p>I'm doing something that requires me to get a full opacity version of a view snapshot even though the view's .alpha property is set to a non-1 value.</p>
  
  <p>I'm getting my snapshot via quick snapshotting in iOS 7:</p>
  
  <pre><code>UIGraphicsBeginImageContextWithOptions(size, NO, 0.0f);
  [self drawViewHierarchyInRect:CGRectMake(0, 0, size.width, size.height) afterScreenUpdates:NO];
  UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
  UIGraphicsEndImageContext();
  </code></pre>
  
  <p>I'm looking at converting this to bitmap data and modifying all of the alpha values by 1 - view.alpha. I think this would work, but I need to get non-premultiplied bitmap data.</p>
  
  <pre><code>CGContextRef context = NULL;
  CGColorSpaceRef colorSpace;
  uint32_t *bitmapData;
  
  size_t bitsPerPixel = 32;
  size_t bitsPerComponent = 8;
  size_t bytesPerPixel = bitsPerPixel / bitsPerComponent;
  
  size_t width = CGImageGetWidth(image);
  size_t height = CGImageGetHeight(image);
  
  size_t bytesPerRow = width * bytesPerPixel;
  size_t bufferLength = bytesPerRow * height;
  
  colorSpace = CGColorSpaceCreateDeviceRGB();
  
  if(!colorSpace) {
      NSLog(@"Error allocating color space RGB\n");
      return NULL;
  }
  
  // Allocate memory for image data
  bitmapData = (uint32_t *)malloc(bufferLength);
  
  if(!bitmapData) {
      NSLog(@"Error allocating memory for bitmap\n");
      CGColorSpaceRelease(colorSpace);
      return NULL;
  }
  
  //Create bitmap context
  context = CGBitmapContextCreate(bitmapData,
                                  width,
                                  height,
                                  bitsPerComponent,
                                  bytesPerRow,
                                  colorSpace,
                                  (kCGBitmapAlphaInfoMask &amp; kCGImageAlphaLast)); //RGBA
  </code></pre>
  
  <p>Unless there is a simpler way to go about this, why can't I get kCGImageAlphaLast to work? kCGImageAlphaPremultipliedLast seems to work, but this will not work.</p>
  
  <pre><code>&lt;Error&gt;: CGBitmapContextCreate: unsupported parameter combination: 8 integer bits/component; 32 bits/pixel; 3-component color space; kCGImageAlphaLast; 8192 bytes/row.
  </code></pre>