我需要在IOS 5.0 ... 進行凹凸變形的xcode我不顯示任何錯誤,也我沒有得到任何輸出... 同時跟蹤並打印顛簸過濾例如它打印空值...如何在ios 5.0中執行Bump Distortion?
有關的任何想法...
一些後表明,沒有工作,IOS 5.0, 任何其他方式在那裏進行凹凸變形...
在此先感謝....
問候,
的SpyNet
我的代碼...
context = [CIContext contextWithOptions:nil];
CIFilter *bumpDistortion = [CIFilter filterWithName:@"CIBumpDistortion"];
[bumpDistortion setValue:ciimage forKey:kCIInputImageKey];
[bumpDistortion setValue:[CIVector vectorWithX:200 Y:150] forKey:@"inputCenter"];
[bumpDistortion setValue:[NSNumber numberWithFloat:100] forKey:@"inputRadius"];
[bumpDistortion setValue:[NSNumber numberWithFloat:3.0] forKey:@"inputScale"];
CIImage *imageOutput = [bumpDistortion outputImage];
CGImageRef cgimg = [context createCGImage:imageOutput fromRect:[imageOutput extent]];
UIImage *newImg = [UIImage imageWithCGImage:cgimg];
[self.imageView setImage:newImg];
它幫助很多....非常感謝... – Spynet 2012-04-20 04:05:56
我在哪裏可以得到GPUImage框架我需要執行類似的功能? – Spynet 2012-04-20 04:44:26
@Spynet - 你有沒有嘗試上面的鏈接? https://github.com/BradLarson/GPUImage你可以從GitHub獲取框架,以及演示這個的例子。 – 2012-04-20 14:20:32