Possible to Allow User to Crop Picked Image within PHPicker?

Is it possible to allow the user to crop the picked image to a certain aspect ratio/shape? I.e. can we specify an option such as circle, square or 2:3, and allow the user to crop the image after selecting and before that image is returned via the delegate?

Replies

Hello, the classic UIImagePickerController has some of this functionality but you can't customize the aspect ratio. Please submit an enhancement request via feedback with more details on your use case, different options you'd be looking for, etc.

If you need custom crop options right now, you'll need to provide the UI and functionality as part of your app.

So, are you saying that PHPicker does not include the "allows editing" option that UIImagePickerController offers? That is... disappointing. I had hoped for years that Apple would beef up the editing by allowing more than the square overlay option - at least by adding a circle overlay option. Plus, it has always been buggy. So now, we lose that basic and buggy editing functionality with PHPicker and we get nothing in its place? I think that is what you are saying but I want to confirm.
All I want to be able to do is what the Contacts app does when user picks a contact image. I don't even need the filter option, just the nice little circular overlay on the editing/cropping page.
Yes, the current API offered for PHPicker has options for filtering and selection limits (PHPickerConfiguration), but not edit/crop. You'd have to handle any post-edits in your app.

If there are edit or crop options you think would be useful, please do file feedback requests. This is new API and we're interested in learning what parts are good and what things are missing.
I have an app where we use the UIImagePickerController to the let the user set a custom profile photo.  I figured this would be a perfect case for the new PHPicker.  But after implementing it it appears that I’m still better off with UIImagePickerController since I need the allowsEditing option (so the user can crop their photo).

Also when using UIImagePickerController on iOS14 it appears to be showing the PHPicker controller anyway.  And I believe UIImagePickerController never asked for photo library access to begin with.

So I’m unsure of what the advantages are of changing the code to use PHPicker.  Please don’t deprecate UIImagePickerController without adding ‘allowsEditing’ support to PHPicker.
Many in devs use allowEditing property of UIImagePickerController to remove unwanted boundary area of image. It should be in PHPicker