sarriaroman / photoviewer

PhotoViewer Cordova Plugin
MIT License
156 stars 213 forks source link

Preserve Aspect Ratio #41

Closed mk79 closed 7 years ago

mk79 commented 7 years ago

First of all, thanks for the Plugin.

I wonder if it is possible to preserve the aspect ratio of the image - the image always stretches over the whole width and height of the screen.

Is this possible?

Thanks.

jlno commented 7 years ago

+1

sarriaroman commented 7 years ago

Can you please tell me if Android or iOS? Thanks!

sarinsukumar commented 7 years ago

This commit has broken behavior. 9f200b1d5a41be41f31eb97c42867e76d6204014

mk79 commented 7 years ago

@sarriaroman it's on Android (Samsung Galaxy S7)

sarriaroman commented 7 years ago

@sarinsukumar @mk79 sadly the fix was made to avoid problems with images bigger than 100kb. Maybe a PR can be created to make it conditional but introduces the problem of the images again. I'm trying with a different library but still in testing. Maybe works for you just change the plugin from the android project but take care of the size of the image because your app will blow up.

sarinsukumar commented 7 years ago

Ok, l will probably look to fix it, will update you.

Best Regards

Sarin sukumar A

On Thu, Nov 3, 2016 at 6:24 PM, Román A. Sarria notifications@github.com wrote:

@sarinsukumar https://github.com/sarinsukumar @mk79 https://github.com/mk79 sadly the fix was made to avoid problems with images bigger than 100kb. Maybe a PR can be created to make it conditional but introduces the problem of the images again. I'm trying with a different library but still in testing. Maybe works for y

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/sarriaroman/photoviewer/issues/41#issuecomment-258134167, or mute the thread https://github.com/notifications/unsubscribe-auth/AAzEhh82lEgh0Iyn-Z-JxXU2UCQrECcQks5q6dl1gaJpZM4KkPyS .

sarinsukumar commented 7 years ago

Is there a way I can change plugin source from the project ? will it reflect ? I tried but not reflecting the changes. I think may be we can resize the image while showing it to restrict within certain size.

ekrapfl commented 7 years ago

I have submitted a pull request to correct the issue.

dawidfiruzek commented 7 years ago

Created pull request with fix to preserve the aspect ratio of the images https://github.com/sarriaroman/photoviewer/pull/45