Skip to content

Instantly share code, notes, and snippets.

@Bccc1
Bccc1 / README.md
Last active March 4, 2026 23:05
ICAT Zoom-fix

ICAT Zoom-fix / Prevent Downscaling

When using the ICAT html viewer with a zoom below 100%, the picture is downscaled. This can cause aliasing and lead the viewer to percieve a blurry video to be superior to one with fitting sharpness.

To prevent this misconception without having to educate the viewer, this script snippet prevents the user to zoom out further than a 1:1 mapping. Zooming in is still allowed.

What does it do?

  • The minimum Zoom is calculated based on the device pixel ratio reported by the browser.