YPImagePicker icon indicating copy to clipboard operation
YPImagePicker copied to clipboard

Multiple selection dimension inconsistency

Open Ludotrico opened this issue 5 years ago • 4 comments

I am aware that this library is meant to copy instagrams media picker.

One issue I have found is that when selecting multiple peices of media from the library, the dimensions are inconsistent. If the user picks a photo with a 1:1 ratio and then an image with a 16:9 ratio, the library does not force one ratio or the other like instagram does.

Currently this feature: config.library.onlySquare = true

Enforces ubiquitous square cropping for all media. However, there should be a dynamic setting that enforces the aspect ratio of all subsequent multiple selections based on the ratio of the first piece of media selected, just like instagram does.

Thoughts?

Ludotrico avatar Jun 26 '20 21:06 Ludotrico

Hello @Ludotrico,

I think that the best solution at the moment is to handle the resource manually once your callback (handler) is invoked. You can trim the asset if you want. I don't think that the library should force the same aspect ration, because some part of the image will be lost. I would prefer to give the developer freedom to decide what to do in those cases.

heitara avatar Jul 04 '20 20:07 heitara

@Ludotrico great issue found here, Thanks for the detailed explanation. Both points seem valid but I'd err on the side of doing the Instagram's way. As you said this is meant to be a copycat so I think we should mirror Instagram's way of doing things as closely as possible.

s4cha avatar Sep 24 '20 14:09 s4cha

Should we provide a default implementation that copies the Instagram behavior and allow to override it? What do you think @s4cha

heitara avatar Sep 24 '20 17:09 heitara

@s4cha updates?

Ludotrico avatar Mar 17 '21 03:03 Ludotrico