0

我正在做一个项目,我正在对图像实施模糊效果。这是我正在使用的代码..

GPUImageMotionBlurFilter *motionblurfilter=[[GPUImageMotionBlurFilter alloc]init];
        motionblurfilter.blurAngle=90.0;
        motionblurfilter.blurSize=15.0;
        UIImageView *img=[[UIImageView alloc]init];
        img.image=self.backgroundImgView.image;
        NSLog(@"00000 %@",img.image);
        // img.image=[motionblurfilter imageByFilteringImage:self.backgroundImgView.image];
        NSLog(@"11111 %@",img.image);
        // self.backgroundImgView.image=[motionblurfilter imageByFilteringImage:self.backgroundImgView.image];

        duplicateImgView.image = tattooImgView.image;

        UIImageView *img1=[[UIImageView alloc]init];
        img1.image=self.tattooImgView.image;
        NSLog(@"00000 %@",img1.image);
        img1.image=[motionblurfilter imageByFilteringImage:self.tattooImgView.image];
        NSLog(@"11111 %@",img1.image);
        self.tattooImgView.image=[motionblurfilter imageByFilteringImage:self.tattooImgView.image];

        tattooImgView.alpha=0.70f;
        duplicateImgView.alpha=0.35f;

此代码在模拟器中正常工作,但在设备中不能正常工作。请帮助我哪里出错了..

4

1 回答 1

1

这可能会回答您的问题:

iOS 7模拟器与设备差异?

extract:
"
模糊效果会出现在:

  • iPhone 4S 及更新版本
  • iPad 第 4 代及更新版本
  • 所有 iPad 迷你
    "
于 2013-10-22T09:23:32.670 回答