I'm writing an iPhone app. I want a UIImagePicker control to come up when the app is launched. When the user selects an image, I want to resize that to being 512x512 with the original image just in the top-left. I then want to save it to a new file in my app's folder.
How do I achieve this?