Tinting iPhone application screen red

Posted by btschumy on Stack Overflow See other posts from Stack Overflow or by btschumy
Published on 2009-09-24T13:02:39Z Indexed on 2010/06/07 15:02 UTC
Read the original article Hit count: 314

I'm trying to place a red tint on all the screens of my iPhone application. I've experimented on a bitmap and found I get the effect I want by compositing a dark red color onto the screen image using Multiply (kCGBlendModeMultiply).

So the question is how to efficiently do this in real time on the iPhone?

One dumb way might be to grab a bitmap of the current screen, composite into the bitmap and then write the composited bitmap back to the screen. This seems like it would almost certainly be too slow. In addition, I need some way of knowing when part of the screen has been redrawn so I can update the tinting.

I can almost get the effect I want by putting a red, translucent, fullscreen UIView above everything. That tints everything red within further intervention on my part, but the effect is much "muddier" than results from the composite.

So do any wizards out there know of some mechanism I can use to automatically composite the red over the app in similar fashion to what the translucent red UIView does?

© Stack Overflow or respective owner

Related posts about iphone

Related posts about objective-c