Switched to using CGBitmapContextCreate(). More parameter checks.