简体   繁体   中英

How can I make image brighter (more light as flash effect) using Core Graphics

How can I get flash effect for images got from Camera? After I got image from camera (it shows in UIImageView) and before saving it as a file I'd like to lighten (in some cases) image by pressing Flash button. Is it possible by using Core Graphics ??

Have a look at my answer to this question . That question was about making an image darker, but you could use exactly the same code and make the image lighter by overlaying a partially transparent white color:

//draw a 50% white overlay
CGContextSetGrayFillColor(cx, 1.0, 0.5);
CGContextFillRect(cx, imageRect);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM