Commit graph

4 commits

Author SHA1 Message Date
Thiemo Kreuz
32a429e8c4 tests: Prefer assertSame() when comparing the integer 0
assertSame() is guaranteed to not do any type conversion. This can be
critical when acciden tially comparing, for example, 0 to 0.0.

Change-Id: Iffcc9bda69573623ba14af655dcd697d0fcce525
2019-09-19 15:35:23 +00:00
Max Semenik
1199f36b61 JpegPixelFormatTest: use Shell class
Change-Id: I53099827dc2b2b26b7f3cbc9f0e12030868fdafd
2019-02-09 22:20:25 -08:00
Umherirrender
a2f3f6df4f Add missing @covers to media related tests
Change-Id: Ideb4fcf4e0c55c3720557b3d93eec06f671b3fd9
2019-02-01 21:15:54 +00:00
Brion Vibber
a30bc4f7e0 Enable 4:2:0 chroma subsampling for JPEG thumbnails
* Add $wgJpegPixelFormat, default to 'yuv420'
* Implemented for ImageMagick via CLI and extension
* Currently ignored for other scaler backends
* Added test case to run when using ImageMagick

4:2:0 subsampling can save an average of 17% bandwidth
over 4:4:4 subsampling, at the cost of some artifacting
at sharp red or blue edges. This is usually not noticeable
in photographic images.

To restore the previous behavior, set to false:

  $wgJpegPixelFormat = false;

which will maintain the original file's pixel subsampling
settings in the thumbnail.

Can set explicitly to one of:

  'yuv444' - never subsample
  'yuv422' - subsample 2x horizontally, not vert
  'yuv420' - subsample 2x in both dimensions

Bug: T129128
Change-Id: Ib9cb36c3a7e6a69d66c11150ef4a1d02dbac2df5
2016-04-27 15:36:18 -07:00