如何使用 GPUImageBrightnessFilter 更改带有滑块的图像的亮度?
我试过了,
-(void)updateBrightness {
GPUImageFilter *selectedFilter = nil;
[selectedFilter removeAllTargets];
selectedFilter = [[GPUImageFilter alloc] init];
CGFloat midpoint = [(UISlider *)sender value];
[(GPUImageBrightnessFilter *)settingsFilter setBrightness:midpoint];
UIImage *filteredImage = [selectedFilter imageByFilteringImage:_image_view.image];
fx_imageView.image = filteredImage;
}