Use ViewWdith/ViewHeight to get rotated dimensions when calculating thumbnail size

This commit is contained in:
Isaac Connor 2020-08-27 12:44:56 -04:00
parent dc15663030
commit e9cef72d9f
1 changed files with 2 additions and 2 deletions

View File

@ -286,10 +286,10 @@ for( $monitor_i = 0; $monitor_i < count($displayMonitors); $monitor_i += 1 ) {
$imgHTML='';
if ( ZM_WEB_LIST_THUMBS && ($monitor['Status'] == 'Connected') && $running ) {
$options = array();
$ratio_factor = $Monitor->Height() / $Monitor->Width();
$ratio_factor = $Monitor->ViewHeight() / $Monitor->ViewWidth();
$options['width'] = ZM_WEB_LIST_THUMB_WIDTH;
$options['height'] = ZM_WEB_LIST_THUMB_HEIGHT ? ZM_WEB_LIST_THUMB_HEIGHT : ZM_WEB_LIST_THUMB_WIDTH*$ratio_factor;
$options['scale'] = intval(100*ZM_WEB_LIST_THUMB_WIDTH / $Monitor->Width());
$options['scale'] = intval(100*ZM_WEB_LIST_THUMB_WIDTH / $Monitor->ViewWidth());
$options['mode'] = 'single';
$stillSrc = $Monitor->getStreamSrc($options);