Index: trunk/extensions/PdfHandler/PdfHandler.image.php |
— | — | @@ -72,7 +72,7 @@ |
73 | 73 | $width = intval( trim( $size[0] ) / 72 * $wgPdfHandlerDpi ); |
74 | 74 | $height = explode( ' ', trim( $size[1] ), 2 ); |
75 | 75 | $height = intval( trim( $height[0] ) / 72 * $wgPdfHandlerDpi ); |
76 | | - if ( $r == 90 || $r == 270 ) { |
| 76 | + if ( ( $r/90 ) & 1 ) { |
77 | 77 | // Swap width and height for landscape pages |
78 | 78 | $t = $width; |
79 | 79 | $width = $height; |