TinyRGB support for JPG thumbnails
authorGilles Dubuc <gdubuc@wikimedia.org>
Mon, 15 Jun 2015 16:23:46 +0000 (18:23 +0200)
committerOri.livneh <ori@wikimedia.org>
Mon, 22 Jun 2015 16:17:54 +0000 (16:17 +0000)
commit584a23931854e256eb219483cf5cba8ecc411ee8
tree84225e8751fa8ef371c2fbb654005387d18d6987
parente8e8670e7ce6837e0331c8565cd390fca04152e5
TinyRGB support for JPG thumbnails

TinyRGB is an ICC profile released by Facebook under CC0.
It is designed to be fully compatible with sRGB.
It offers the vast advantages of being much smaller than sRGB,
as well as being free as in freedom (the sRGB profile found in the
majority of JPGs is copyrighted).

This change aims to provide the ability to swap sRGB for TinyRGB at
the time thumbnails are generated.

JPGs that use another ICC profile than sRGB or no profile at all are
unaffected.

Bug: T100976
Change-Id: I2ae35ddad4e8a82db8b9541974367dc76c884e7a
includes/DefaultSettings.php
includes/media/Bitmap.php
includes/media/ExifBitmap.php
includes/media/Jpeg.php
includes/media/tinyrgb.icc [new file with mode: 0644]
maintenance/dictionary/mediawiki.dic
tests/phpunit/data/media/srgb.jpg [new file with mode: 0644]
tests/phpunit/data/media/tinyrgb.icc [new file with mode: 0644]
tests/phpunit/data/media/tinyrgb.jpg [new file with mode: 0644]
tests/phpunit/includes/media/ExifBitmapTest.php