is it possible to change the iPhone background from code?
If you write a new png to /User/Library/LockBackground.png
and then call notify_post(" com.apple.language.changed");
the device will respring and your new background will be present.
This isn't technically a private API, but does fall outside of what Apple allows on the store.
Nope, you can only save a picture for the user to set as a background.
Mel is correct, there's no way to skip over the save process.
The reason this will always be the case:
Apple doesn't want apps to be able to set the background immediately upon opening. Theoretically, they could have a permission box (like the location dialog), but I doubt that will happen anytime soon.