Skip to content

Instantly share code, notes, and snippets.

@od0x0
Created September 10, 2011 23:55
Show Gist options
  • Save od0x0/1208965 to your computer and use it in GitHub Desktop.
Save od0x0/1208965 to your computer and use it in GitHub Desktop.
NSBitmapImageRep* bitmapImageRep = [[NSBitmapImageRep alloc]
initWithBitmapDataPlanes: NULL
pixelsWide: targetImage.width
pixelsHigh: targetImage.height
bitsPerSample: 8
samplesPerPixel: 4
hasAlpha: YES
isPlanar: NO
colorSpaceName: NSDeviceRGBColorSpace
bytesPerRow: 0
bitsPerPixel: 0];
//Gives "Inconsistent set of values to create NSBitmapImageRep", width and height are NOT 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment