I am trying to use GPUImageRGBFilter, but to no avail. I want to change each channel value, for example:
Red: 0.2 Green: 0.4 Blue: 0.3
How can i do this? Can someone tell me how to use GPUImageRGBFilter?
Assuming what you want to do is multiply the values ββof each color channel by the values ββin your message, the solution should be pretty simple:
GPUImageRGBFilter *rgbFilter = [[GPUImageRGBFilter alloc] init]; [rgbFilter setRed:.2]; [rgbFilter setGreen:.4]; [rgbFilter setBlue:.3];
Then use addTarget: and processImage as indicated in the documentation .
addTarget:
processImage
Properties are specified in the GPUImageRGBFilter class, please check
@property (readwrite, nonatomic) CGFloat red,@property (readwrite, nonatomic) CGFloat green,@property (readwrite, nonatomic) CGFloat blue;