From 45fc689203b9051cc95574956b0802c11b13b092 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Mon, 4 Jan 2016 13:15:50 -0500 Subject: [PATCH] implement Width and Height functions, and test for image rotation and output opposite dimension. Fixes #1220 --- web/includes/Monitor.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/web/includes/Monitor.php b/web/includes/Monitor.php index 8aa7f4dc9..6b983018e 100644 --- a/web/includes/Monitor.php +++ b/web/includes/Monitor.php @@ -80,5 +80,17 @@ class Monitor { return( $streamSrc ); } // end function etStreamSrc + public function Width() { + if ( $this->Orientation() == '90' or $this->Orientation() == '270' ) { + return $this->{'Height'}; + } + return $this->{'Width'}; + } + public function Height() { + if ( $this->Orientation() == '90' or $this->Orientation() == '270' ) { + return $this->{'Width'}; + } + return $this->{'Height'}; + } } ?>