Reputation: 7333
I've trying to use the GPUImageRGBFilter but without success. I want to change each channel value, for instance:
Red: 0.2
Green: 0.4
Blue: 0.3
How can I do this? Can anyone tell me how to use GPUImageRGBFilter?
Upvotes: 3
Views: 580
Reputation: 2832
Properties are Given there in GPUImageRGBFilter Class please check for
@property (readwrite, nonatomic) CGFloat red;
@property (readwrite, nonatomic) CGFloat green;
@property (readwrite, nonatomic) CGFloat blue;
Upvotes: 2
Reputation: 2841
Assuming what you want to do is multiply the values of each color channel by the values in your post, 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 the documentation instructs.
Upvotes: 1