Piasy / BigImageViewer

Big image viewer supporting pan and zoom, with very little memory usage and full featured image loading choices. Powered by Subsampling Scale Image View, Fresco, Glide, and Picasso. Even with gif and webp support! 🍻
MIT License
3.98k stars 402 forks source link

Thumbnail init scale type? #101

Closed ParkerK closed 6 years ago

ParkerK commented 6 years ago

First off, hats off to you on this amazing library, @Piasy. It's so nice to be able to replace several of my classes with such a nice library (and one that's not buggy like my implementation was!)

I was wondering if there was a way to set an initial scale type for the thumbnail, as I would like the lower resolution thumbnails I have to stretch to fit (centerInside) while the higher resolution image loads. I find the sudden change in image sizes a bit jarring.

If you use anything but the default crop type it works, but for some reason centerInside won't stretch the image to fit

ParkerK commented 6 years ago

Nevermind, it's because CENTER_INSIDE is acting as it should. Changing it to CENTER_FIT fixed my issue. I will add a PR with CENTER_FIT added as a scale type

Piasy commented 6 years ago

PR is welcome :)