tags:

views:

319

answers:

2

I have a photo displayed on an iPhone. I would like to lower brightness of the photo at first, and when the user touches the photo, I would like to raise the brightness of the rectangular region near where the user touched, like this:

www.cottagearts.net/tut_images/tut_cropping_pse_06.jpg

Could anyone point me to a simple way of doing this?

+1  A: 

While you can't actually adjust the brightness of the screen, you can put a semi-transparent image on the screen. I'd paint everywhere but where the user touched with an color that is black, but has X transparency, which is exactly what that image is showing that you linked to.

Malfist
A: 

I'm no expert, but I've been trying to do something similar. You could implement this with layers. As Malfist suggested, you could make a black layer with a certain opacity and may the clicked part of it fully transparent or somesuch. Another option would be to do some image processing. I found an article here that I think will handle my highlighting issue:

http://arstechnica.com/apple/news/2009/03/iphone-dev-basic-image-processing-package.ars

Spina