0

I am trying to use CIFilter on NSImage. But I am getting Thread 1: signal SIGABRT error at return NSApplicationMain(argc, (const char **)argv); when trying to run it. And allot of console entries. Witch looks like this:

2012-07-30 10:07:29.696 OGL[962:303] -[NSConcreteData CGImage]: unrecognized selector sent to instance 0x10180fde0
2012-07-30 10:07:29.696 OGL[962:303] An uncaught exception was raised

4

1 回答 1

0

我想到了。我创建 NSBitmapImageRep 错误。它看起来像这样:

NSBitmapImageRep *bitmap = (NSBitmapImageRep*)[imageN TIFFRepresentation];

必须看起来像这样

NSData *imgData = [imageN TIFFRepresentation];
NSBitmapImageRep *bitmap = [NSBitmapImageRep imageRepWithData:imgData];
于 2012-07-30T07:38:20.153 回答