Using GPUImageRGBFilter

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?

+4
source share
2 answers

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 .

+1
source

Properties are specified in the GPUImageRGBFilter class, please check

@property (readwrite, nonatomic) CGFloat red,
@property (readwrite, nonatomic) CGFloat green,
@property (readwrite, nonatomic) CGFloat blue;

+2
source

All Articles