Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Render original size of image on full screen? #22

Open
carlo-fontanos opened this issue Apr 25, 2017 · 5 comments
Open

Render original size of image on full screen? #22

carlo-fontanos opened this issue Apr 25, 2017 · 5 comments

Comments

@carlo-fontanos
Copy link

carlo-fontanos commented Apr 25, 2017

Hi,

Thank you for this wonderful plugin, it works great on desktop and mobile devices.

I was wondering if there is currently a way to render the original size of the image on full screen? I am loading a 250 X 250 px image on imageviewer via full screen and it shows pixelated on a 24" monitor.

ie.
From: https://goo.gl/photos/fbEBwHqspbjDVBV88
To this: https://goo.gl/photos/FVg9ANB64HoiP7A18

Thanks

@paulbroyles
Copy link

+1. My site has a mix of large images and small images, all of which I'd like to display through fullscreen ImageViewer.

A bare minimum need is to have maxZoom respected even when an image is smaller than the viewport.

Ideally, I'd want a way to continue to display images larger than the viewport zoomed out to fill the viewport (as now) while images smaller than the viewport could be displayed at their original size (or zoomed up to maxZoom). This seems to me as though it would require a new option, though maybe I'm missing a possibility.

@bhartvigsen
Copy link

Same problem here

@weisborg
Copy link

I too would like to see this. If zoomValue is 100, then it should not be starting out at a higher zoom for smaller images. Seems like a bug to me. Almost seems like it is stretching images to fill and considering that 100%. If I specify a higher than 100 value for zoomValue it actually zooms further when already zoomed.

@weisborg
Copy link

A little bit of a hack, but I fixed this with adding:

imgWidth = Math.min(imgWidth, imageWidth);

Inside _calculateDimensions right after imgWidth is calculated before imgHeight is set.

Image can get off center a bit, but when you start dragging/panning it will spring back to center.

@mea-alexanm
Copy link

Hi,

I also would vote for this. A zoom of 100% should show the image in its original size, regardless its bigger or smaller than the container. When the image is bigger then there could always be the option to fit it into the screen by calculating the corresponding zoom factor.

BR
Markus

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants