jamesmontemagno / Xamarin.Plugins

Cross-platform Native API Access from Shared Code!
MIT License
1.3k stars 380 forks source link

[feature request] Media Picker Option to set image size #210

Closed rd09 closed 8 years ago

rd09 commented 8 years ago

It would be very helpful to have the option in StoreCameraMediaOtions of setting an image size.

jamesmontemagno commented 8 years ago

Can you try out https://www.nuget.org/packages/Xam.Plugin.Media/2.4.0-beta2

I added a "PhotoSize" for small, medium, and large for scaling 25, 50, and 75% for iOS and Android;

rd09 commented 8 years ago

Thanks, that is awesome!

LogicMate commented 8 years ago

Thanks for the PhotoSize, it works like a charm. We are really looking for a solution to specify custom sizes so we can keep pictures in a specific ratio. for example we want to capture 640x480, 800x600 etc. and keep the aspect ration to 4:3. Would this be possible?

thanks

LogicMate commented 8 years ago

Also would we be able to force the orientation of the camera?

jamesmontemagno commented 8 years ago

I have thought about doing a custom ratio and may change it in the future, but wanted to get some feedback. Just need to add a lot of logic. A scale was easier to implement that would cover most use cases.

marcojak commented 8 years ago

When I set PhotoSize = Plugin.Media.Abstractions.PhotoSize.Small, the image become a square. If I don't set the PhotoSize property, the image is fine. This happens on iOS. I tested it on an iPad mini but a colleague with an iphone 5 told me the same.

avanbrenk commented 8 years ago

@jamesmontemagno First of all, I have been using your Media plugin for a while now. It works great, thanks for making this available for us.

Is there any news on this feature? I have been following it, and I see there is a beta version available. Is that version "safe" to use in a production app? I would like to use the plugin for another app, but I need the resizing and auto-rotate functionality for that one. Any idea on when this will be in a production version?

Thanks in advance.

jamesmontemagno commented 8 years ago

This issue was moved to jamesmontemagno/MediaPlugin#24

fabriciomoreirao commented 6 years ago

very good

fabriciomoreirao commented 6 years ago

var mediaFile = await this._mediaPicker.TakePhotoAsync(new StoreCameraMediaOptions { DefaultCamera = CameraDevice.Front, PhotoSize = PhotoSize.Medium

            });
fabriciomoreirao commented 6 years ago

var pick = new PickMediaOptions(); pick.PhotoSize = PhotoSize.Medium;

            var mediaFile = await this._mediaPicker.PickPhotoAsync(pick);
okerider commented 1 year ago

Any updates on the MediaPicker yet?