(bug 28762) Resizing to specified height broken for very thin images
authorBryan Tong Minh <btongminh@users.mediawiki.org>
Fri, 15 Jul 2011 19:03:40 +0000 (19:03 +0000)
committerBryan Tong Minh <btongminh@users.mediawiki.org>
Fri, 15 Jul 2011 19:03:40 +0000 (19:03 +0000)
commit0222e58b9f2daf12c5fe7eaca2d6b8e0f0d11833
treeb84887ca8ab8032ab44be72f90c477e923a53652
parentc159f504890e4abf0bf27790718031e706095f51
(bug 28762) Resizing to specified height broken for very thin images

Restructure and comment of ImageHandler::normaliseParams(). ImageHandler::normaliseParams() will now output both width/height as physicalWidth/Height, where width/height are the dimensions used by the browser, and physicalWidth/Height are the dimensions of the thumbnail that will be created. This allows keeping the use of unique dimensions for a specified thumbnail width, by forcing client side resizing of 1px-wide images with non corresponding height.
Also fixed a bug where the check for mustRender() was in an if statement where it should not have been.
includes/media/Bitmap.php
includes/media/DjVu.php
includes/media/Generic.php
includes/media/SVG.php
tests/phpunit/includes/media/BitmapScalingTest.php [new file with mode: 0644]