Allow mobile to reduce image quality
authorYuri Astrakhan <yurik@wikimedia.org>
Fri, 9 May 2014 05:51:59 +0000 (01:51 -0400)
committerYuri Astrakhan <yurik@wikimedia.org>
Fri, 9 May 2014 20:39:54 +0000 (16:39 -0400)
commita77032257f0ed30381bb32bfaf2047e6731267db
treed6f8f3bd20abf1d4e839c97fe8cf3552406ad246
parenta3983418d5748fbccdda15e0e48af90c50ef1f67
Allow mobile to reduce image quality

http://www.mediawiki.org/wiki/Requests_for_comment/Reducing_image_quality_for_mobile

Per above RFC, this patch implements the core changes required to
specify quality reduction of JPEG via URL. To test, make sure your
setup uses 404-based thumb generation. Vagrant supports it by adding
"multimedia" role:  $ vagrant add-role multimedia && vagrant provision
* Pick any thumbnail jpeg URL that exists on the test wiki, e.g.
  http://.../images/thumb/4/49/Img.jpg/400px-Img.jpg
* check that basic scaling works by altering 400
* add quality parameter qlow- right before px:
  http://.../images/thumb/4/49/Img.jpg/qlow-400px-Img.jpg

Change-Id: I930ea06be6d302ffc8832d12b251422a9f1b3e75
includes/Linker.php
includes/media/Bitmap.php
includes/media/Jpeg.php