开发者

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

开发者 https://www.devze.com 2022-12-30 01:33 出处:网络
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 lig开发者_运维百科hten (in some cases) image

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 lig开发者_运维百科hten (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);
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号