//TODO set filter - (void) selectFilter2:(NSString *) nameLUT{ // Create filter CIFilter * lutFilter = [CIFilter filterWithLUT: @ "filter_lut_2" dimension: 64]; // Set parameter CIImage *ciImage = [[CIImage alloc] initWithImage:[UIImage imageNamed:@"100"]]; [lutFilter setValue:ciImage forKey:@"inputImage"]; CIImage *outputImage = [lutFilter outputImage]; CGColorSpaceRef spaceRef = CGColorSpaceCreateDeviceRGB(); NSMutableDictionary *dic = [[NSMutableDictionary alloc] init]; [dic setObject:(__bridge id _Nonnull)(spaceRef) forKey:kCIContextWorkingColorSpace]; CIContext *context = [CIContext contextWithOptions:dic]; CFRelease(spaceRef); CGImageRef imageRef = [context createCGImage:outputImage fromRect:outputImage.extent]; newImage = [UIImage imageWithCGImage:imageRef]; CFRelease(imageRef); //save the album UIImageWriteToSavedPhotosAlbum(newImage, self, @selector(imageSavedToPhotosAlbum:didFinishSavingWithError:contextInfo:), nil); } - (void)imageSavedToPhotosAlbum:(UIImage *)image didFinishSavingWithError:(NSError *)error contextInfo:(void *)contextInfo { NSString *message; if (!error) { message = @"Successfully saved to album"; [self showStrAlert:@"Successfully saved to album"]; }else { [self showStrAlert:[NSString stringWithFormat:@"%@",error]]; } }