问答详情
源自:3-1 灰度图像处理算法

CGBitmapContextCreate 创建context报错

: CGBitmapContextCreate: unsupported parameter combination: set CGBITMAP_CONTEXT_LOG_ERRORS environmental variable to see the details: CGContextDrawImage: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable. 怎么老是报这个错呢?

提问者:qq_木子方糖_0 2017-07-03 15:42

个回答

  • qq__8976
    2017-09-13 16:44:12

    CGContextRef context = CGBitmapContextCreate(data, imageSize.width, imageSize.height, 8, 4 * imageSize.width, colorSpaceRef, kCGImageAlphaPremultipliedLast | kCGBitmapByteOrder32Big);

      最后一个参数