Use ViewWdith/ViewHeight to get rotated dimensions when calculating thumbnail size
This commit is contained in:
parent
dc15663030
commit
e9cef72d9f
|
@ -286,10 +286,10 @@ for( $monitor_i = 0; $monitor_i < count($displayMonitors); $monitor_i += 1 ) {
|
||||||
$imgHTML='';
|
$imgHTML='';
|
||||||
if ( ZM_WEB_LIST_THUMBS && ($monitor['Status'] == 'Connected') && $running ) {
|
if ( ZM_WEB_LIST_THUMBS && ($monitor['Status'] == 'Connected') && $running ) {
|
||||||
$options = array();
|
$options = array();
|
||||||
$ratio_factor = $Monitor->Height() / $Monitor->Width();
|
$ratio_factor = $Monitor->ViewHeight() / $Monitor->ViewWidth();
|
||||||
$options['width'] = ZM_WEB_LIST_THUMB_WIDTH;
|
$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['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';
|
$options['mode'] = 'single';
|
||||||
|
|
||||||
$stillSrc = $Monitor->getStreamSrc($options);
|
$stillSrc = $Monitor->getStreamSrc($options);
|
||||||
|
|
Loading…
Reference in New Issue