A comparison chart on the line:
Obviously, the above image is a blur effect, and we are often used in the actual development of such images as background, this effect has many ways to do. For a simple way, the code comes in:
//Loading picture creation ImageViewUIImage *image = [UIImage imagenamed:@"Psb.png"]; Uiimageview* ImageView =[[Uiimageview alloc] init]; Imageview.contentmode=Uiviewcontentmodescaleaspectfit; Imageview.frame= CGRectMake (0, the, the, the); [Self.view Addsubview:imageview]; //Convert PictureCicontext *context =[Cicontext Contextwithoptions:nil]; Ciimage*midimage =[Ciimage imagewithdata:uiimagepngrepresentation (image)]; //Image Start processingCifilter *filter = [Cifilter filterwithname:@"Cigaussianblur"]; [Filter Setvalue:midimage Forkey:kciinputimagekey]; //Value changes blur effect values[Filter setvalue:@7.0fForkey:@"Inputradius"]; Ciimage*result =[Filter Valueforkey:kcioutputimagekey]; Cgimageref Outimage=[Context Createcgimage:result fromrect:[result extent]; //convert into UIImageUIImage *resultimage =[UIImage Imagewithcgimage:outimage]; Imageview.image= Resultimage;
Isn't it easy?
IOS image Processing--Gaussian blur background