Reputation: 229
I've an image , I want to change its brightness and I need to save the resultant image obtained from the actual image, how can I do it. I want to increase the brightness using a UIslider?
Upvotes: 1
Views: 6270
Reputation: 1339
Here's the sample code and explanation about implementing simple image processing filters (Brightness, Contrast, Saturation, Hue rotation, Sharpness) using OpenGL ES1.1. I recommend you this apple's official link here
Upvotes: -1
Reputation: 17186
Get the code from the Github for UIImage
category here.
To brighten the image, write the code as below:
//brighten value can be obtained from slider change event from -255 to 255.
UIImage* brightImage = [originalImage brightenWithValue:sliderValue];
//Convert image into data
NSData *brightImageData = UIImagePNGRepresentation(brightImage);
//Get the path of Documents directory and store the data object to proper file
Upvotes: 7