ios - Change brightness of an image via uislider and gpuimage filter -
I wrote this code to change the brightness of a UIImage through a UISlider and GPUImageBrightnessFilter. . But every time I test this app crash
my code:
- (IBAction) sliderBrightness: (ID) this {CGFloat middle = [(UISlider *) sender value]; [(GPUImageTiltShiftFilter *) GlitterFilterSetFontsWeekly: Midpoint- 0.1]; [(GPUImageTiltShiftFilter *) Bright Filters SetBottomFocusLow: Midpoint + 0.1]; [SourcePicture processImage]; } - (zero) glowfilter {UIImage * inputImage = imgView.image; SourcePicture = [[GPUImagePicture alloc] initWithImage: inputImage easily optimized for software: Yes]; Glowfilter = [[GPUImageTiltShiftFilter alloc] init]; // Sepia filter = [[GPUImageSobelEdgeDetectionFilter alloc] init]; GPUImageView * imageView = (GPUImageView *) self.view; [Brightness filter force processing transition: imageView.sizeInPixels]; // Now need to run the filter at small output size [sourcePicture addTarget: brightnessfilter]; [Brightness filter add-target: imageview]; [SourcePicture processImage]; } "itemprop =" text "> After the
Comments
Post a Comment