Possible Duplicate:
Notification of or detecting screenshot being taken?
Hi,
I want to prevent the distribution of images from an iphone app that I've authored. As such, I would like to either prevent the screenshot feature from working whilst my app is running or, if the user does take a screenshot, to watermark the image automatically.
Any ideas as to how I could so this?
I'm not sure how the screenshot works. If it simply takes a shot of the graphics buffer then there is no way in app code to prevent it.
However, if it queries the front app for MainWindows its CGImageRef then you might be able to use a UIView subclass to override the default behavior such that instead of returning the image on screen as its CGImage it would return a watermarked image.
Even if this is possible, this would require a great deal of work. You would have to rewrite all the view code to call the unwatermarked image for display internally.
Even if you succeeded, I very much doubt Apple would allow such an app through the app store. Apple doesn't like apps that override default system behavior. They would be concerned that users would think that the failure to take a clear screenshot was a fault of the iPhone and not the app.
Good luck providing intellectual property protection for images. No one has succeeded so far.
Heck, you can't even protect printed works anymore. The fidelity of the cameras that every device now seems to carry is just to high. Recently, I was worried about losing some old family photos and I didn't have a scanner so I photographed them with my iPhone camera. I was shocked to see that the resulting photos were as good as that produced by a low-end scanner. Given that these photos would be used in a digital medium anyway, I now have no real need to scan them.
You're probably better off offering an inexpensive in app purchase mechanism than investing time trying to prevent copying. If people want the images bad enough, they can get them.
Even if you could do that, people can always do things like photograph the iPhone with an external camera, which you have no way to guard against. What is your purpose of preventing screenshots?