Is there any way to access the photo an iPhone is using as its lockscreen or homescreen? I'm trying to read the image being used. Apparently its possible to change the lockscreen photo but I'm wondering if it's possible to access the lockscreen photo. This shows how you can change the lockscreen.
1 Answers
Using strictly public APIs it's not possible to get the exact image used in the lock screen.
That said, you're not completely out of luck. If you have a user screenshot his lock screen you might be able to use that screenshot to determine the original image.
I would first try running this image thru the users local photo library. If there are no matches found you could try a google search on the image and see if that yields any good results.
You'll have to use some image processing algorithms (determine if image is the one used in screenshot's background). For that you should look into OpenCV.
Please note this is a heuristic and will probably NOT work in 100% of cases. As such you may want to think of other ways to optimize the method I've proposed. For example: if the user has a ton of photos saved locally perhaps try a google search first (perhaps faster than doing a linear search thru all the images), If google consistently yield high quality results perhaps opt to use google over local photo library, etc, etc.

- 177
- 1
- 6