can you just pass `null` here, let Quartz alloc its own memory and CGBitmapContextGetData later for the `memcmp`?

https://developer.apple.com/library/ios/documentation/graphicsimaging/Reference/CGBitmapContext/Reference/reference.html#//apple_ref/c/func/CGBitmapContextCreate