xcode中的exc_bad_access代码= 1错误

时间:2014-10-08 18:56:26

标签: ios xcode exc-bad-access

    CIContext *context = [CIContext contextWithOptions:nil];
    CIImage *inputImage = [CIImage imageWithCGImage:theImage.CGImage];

    CIFilter *filter = [CIFilter filterWithName:@"CIGaussianBlur"];
    [filter setValue:inputImage forKey:kCIInputImageKey];
    [filter setValue:[NSNumber numberWithFloat:6] forKey:@"inputRadius"];
    CIImage *result = [filter valueForKey:kCIOutputImageKey];


    CGImageRef cgImage = [context createCGImage:result fromRect:[inputImage extent]];

    returnImage = [UIImage imageWithCGImage:cgImage];

我是Objective C的新手。我不明白:“CGImageRef cgImage = [context createCGImage:result fromRect:[inputImage extent]];”这一行给出“exc_bad_access code = 1”错误。谢谢你的帮助。

0 个答案:

没有答案