| @@ 108-125 (lines=18) @@ | ||
| 105 | * Returns the width when the image orientation is top-left. |
|
| 106 | * @return int |
|
| 107 | */ |
|
| 108 | public function widthTopLeft() { |
|
| 109 | $o = $this->getOrientation(); |
|
| 110 | OC_Log::write('core', 'OC_Image->widthTopLeft() Orientation: '.$o, OC_Log::DEBUG); |
|
| 111 | switch($o) { |
|
| 112 | case -1: |
|
| 113 | case 1: |
|
| 114 | case 2: // Not tested |
|
| 115 | case 3: |
|
| 116 | case 4: // Not tested |
|
| 117 | return $this->width(); |
|
| 118 | case 5: // Not tested |
|
| 119 | case 6: |
|
| 120 | case 7: // Not tested |
|
| 121 | case 8: |
|
| 122 | return $this->height(); |
|
| 123 | } |
|
| 124 | return $this->width(); |
|
| 125 | } |
|
| 126 | ||
| 127 | /** |
|
| 128 | * Returns the height when the image orientation is top-left. |
|
| @@ 131-148 (lines=18) @@ | ||
| 128 | * Returns the height when the image orientation is top-left. |
|
| 129 | * @return int |
|
| 130 | */ |
|
| 131 | public function heightTopLeft() { |
|
| 132 | $o = $this->getOrientation(); |
|
| 133 | OC_Log::write('core', 'OC_Image->heightTopLeft() Orientation: '.$o, OC_Log::DEBUG); |
|
| 134 | switch($o) { |
|
| 135 | case -1: |
|
| 136 | case 1: |
|
| 137 | case 2: // Not tested |
|
| 138 | case 3: |
|
| 139 | case 4: // Not tested |
|
| 140 | return $this->height(); |
|
| 141 | case 5: // Not tested |
|
| 142 | case 6: |
|
| 143 | case 7: // Not tested |
|
| 144 | case 8: |
|
| 145 | return $this->width(); |
|
| 146 | } |
|
| 147 | return $this->height(); |
|
| 148 | } |
|
| 149 | ||
| 150 | /** |
|
| 151 | * Outputs the image. |
|