Watermark on a UIImage with auto contrast?
I want to put a watermark on a UIImag开发者_如何学GoeView. I have two watermark images, a black one and a white one. I want to put the black one on the UIImageView when the area of the watermark is bright, and the white one on the UIImageView when the area of the watermark is dark. How to do that?
Any help would be appreciated.
Perhaps you should consider having a single watermark that looks ok on all backgrounds, like a transparent white with opacity or grey color with a drop shadow. This seems like less hassle than trying to programmatically determine relative brightness on an image.
精彩评论