title: I am getting unsupported parameter combination CGBitmap error with swift
body: <p>I am trying to create a CGContext in swift. It compiles but throws an error at runtime.</p>
  
  <pre><code>let colorSpace:CGColorSpace = CGColorSpaceCreateDeviceRGB()
  let context:CGContext = CGBitmapContextCreate(nil, 20, 20, 8, 0, colorSpace, CGBitmapInfo.AlphaInfoMask)
  CGColorSpaceRelease(colorSpace);
  
  ....
  </code></pre>
  
  <p>And the error is:</p>
  
  <pre><code>Error: CGBitmapContextCreate: unsupported parameter combination: 8 integer bits/component; 32 bits/pixel; 3-component color space; unrecognized; 96 bytes/row.
  fatal error: Can't unwrap Optional.None
  </code></pre>