sachinchoolur / lightGallery

A customizable, modular, responsive, lightbox gallery plugin.
https://www.lightgalleryjs.com/
Other
6.48k stars 1.28k forks source link

Drop in image quality in full size image #1238

Closed robert-dog closed 2 years ago

robert-dog commented 2 years ago

Hi

There seems to be a bug displaying full resolution images. The image is really soft on actual size or zoomed to 1:1, especially when the viewport is smaller than the image.

The size (calculated by 3dtransform?) is off by one to two pixels and this causes a noticable drop in image quality. Ie. the "actual size" image in Lightgallery in my example has dimensions of 2049.56 x 1366.05 pixels. The real size is 2048 x 1365 pixels.

This issue is present in 2.2., 2.3. and 2.4 beta. You can see it in your demo page as well.

Tested in latest Chrome and Edge on Windows 10.

LG soft image

You can see the softness in Windows Chrome in the attached image - the last image is 1:1 the same image on a browser window.

Any plans on fixing the issue? This might not be a problem in blogs etc. but in professional photography or art pages, the quality is not good enough.

Other than this issue Lightgallery is really amazing, you have done a great job.

sachinchoolur commented 2 years ago

Yes, it is a known issue. The quality of the images is slightly reduced on some browsers in certain scenarios.

And you are right. CSS transform is causing the issue. CSS transform is only required for the zoom animation and can be removed once the animation is completed. I've already fixed the issue locally but need some more time to test it properly as I completely re-wrote the zoom module.

The fix will be mostly available in the next version

lucian-tanase commented 2 years ago

Hi,

We have tried v.2.4.0 and there is still an issue with zoom plugin on iOS devices, images look blurry when zoom is applied, indeed because how iOS handles CSS transform, on Android everything works fine. Can the zoom mechanism be improved so images will look sharp on iOS devices too?

Here is a pen describing the issue, it has an older gallery version but the same thing happens in v.2.4.0 too: https://codepen.io/lucian-tls/pen/wvPWYJa

We are ready for purchasing a license to use the plugin but only if the zoom issue can be fixed.

Thank you for your amazing work!

sachinchoolur commented 2 years ago

Yes, the issue is happening majorly on IOS, and the fix is not included in version 2.4.0. It is not noticeable in most of that cases. But definitely an issue for a few images like in your demo.

You can expect the fix in 2.5.0 along with many other zoom module improvements.

lucian-tanase commented 2 years ago

Thank you for looking into it, do you have an estimated time frame for v.2.5.0?

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

sachinchoolur commented 2 years ago

Actively working on it - https://github.com/sachinchoolur/lightGallery/tree/lg-zoom

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.