Files
zoneminder/web/includes/Event.php
SteveGilvarry cd6aeb2c74 fix: correct thumbnail aspect ratio for high-resolution monitors
Event::ThumbnailWidth()/ThumbnailHeight() derived the secondary dimension
through an integer SCALE_BASE scale:

  $scale = intval((SCALE_BASE * THUMB_WIDTH) / Width);
  ThumbnailHeight = reScale(Height, $scale);

For a high-resolution monitor the scale factor is small and intval()
truncates it. e.g. a 2688x1520 monitor with WEB_LIST_THUMB_WIDTH=48 gives
scale = intval(100*48/2688) = intval(1.78) = 1, so the height becomes 15
instead of 27 — a 3.2:1 thumbnail instead of 16:9. The events-list hover
overlay sizes its container from that thumbnail and object-fit:cover-crops
the real (correct-aspect) video into the squashed box, which shows as a
"long narrow" popout.

Compute the secondary dimension directly from the aspect ratio
(round(Height * THUMB_WIDTH / Width)) so no precision is lost.

refs #3443

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-13 22:47:13 +10:00

32 KiB