The .libraryTargetImageSize option already exists but I believe it would make more sense if it were an option to affect not only images from the library but also from pictures taken with the camera.
Otherwise it would be interesting to see an equivalent option for pictures taken with the camera.
@DamascenoRafael This make a ton of sense. I agree that the use case is:
"I want to have an output image that is no bigger than X in size".
I can't think of a use case where I would want to cap library pics but not the images taken from the camera, this would be weird.
In that case libraryTargetImageSize could be renamed into maxOutputImageSize or something like that :)
The implementation should be quite straightforward, essentially adding
let img = self.resizedImageIfNeeded(image: image)
in YPCameraVC line 132.
Hey @s4cha, that's great!
I was taking a look and the resizedImageIfNeeded method belongs to the YPLibraryVC, so I was thinking of creating an extension for UIImage and using it in both YPLibraryVC and YPCameraVC.
Additionally, I would rename YPLibraryImageSize to YPImageSize and move the targetImageSize property out of the YPConfigLibrary struct. I think the name could stay as just targetImageSize since the images can come from both the library and the camera. At the end the user would call config.targetImageSize.
What do you think? If it's okay I can make those changes.
@DamascenoRafael it's sounds perfect, and if you suggest making the changes yourself, then go for it 馃殌 馃憤 馃槃
@DamascenoRafael This should be good in https://github.com/Yummypets/YPImagePicker/releases/tag/3.1.0
Thank you so much for your time and effort on this release 馃挭
Awesome! Thanks for the great lib! Everything working as expected.
Most helpful comment
@DamascenoRafael This should be good in https://github.com/Yummypets/YPImagePicker/releases/tag/3.1.0
Thank you so much for your time and effort on this release 馃挭