CoreImage修补了10.6中的问题

Dha*_*raj 1 macos core-image osx-snow-leopard

在10.6中使用某些系统CoreImage CIPerspectiveTransform(以及其他api也是如此)会在输出图像中产生彩色色块.(看起来像硬件相关的问题它只发生在分辨率高于4000X2500的图像上)

有没有办法摆脱这个错误?最后是否可以使用NSAffineTransform?如果是,如何使用它.

谢谢,Dhana.

iKe*_*dac 5

在创建时CIContext,您是否尝试过禁用硬件渲染器?这解决了我的问题:

CIContext *context = [CIContext contextWithCGContext:[[NSGraphicsContext currentContext] graphicsPort]
                                             options:[NSDictionary dictionaryWithObjectsAndKeys:
                      [NSNumber numberWithBool:YES], kCIContextUseSoftwareRenderer, nil]];
Run Code Online (Sandbox Code Playgroud)