Use file width/height instead of metadata for getContentHeaders
authorGilles Dubuc <gilles@wikimedia.org>
Sat, 20 May 2017 15:53:19 +0000 (17:53 +0200)
committerGilles Dubuc <gilles@wikimedia.org>
Wed, 24 May 2017 08:46:39 +0000 (10:46 +0200)
commit14faf59fd9633db935075b7bd27f85d2142f6826
tree7e9dad8a9e410aac58095233cedb73cfe11ce965
parent264fc98588a4851324d3e5f2e39ece01e993127e
Use file width/height instead of metadata for getContentHeaders

This allows us to populate X-Content-Dimensions without touching the
existing metadata format. Which makes the migration of existing content a lot faster by
only having to run refreshFileHeaders.

Bug: T150741
Change-Id: I2c0f39b2b01f364c3fab997ccc2f874b7f101d8a
19 files changed:
includes/filerepo/file/File.php
includes/filerepo/file/LocalFile.php
includes/media/DjVu.php
includes/media/Exif.php
includes/media/ExifBitmap.php
includes/media/FormatMetadata.php
includes/media/GIFMetadataExtractor.php
includes/media/MediaHandler.php
includes/media/PNGMetadataExtractor.php
includes/media/XCF.php
maintenance/importImages.php
tests/phpunit/includes/media/BitmapMetadataHandlerTest.php
tests/phpunit/includes/media/ExifTest.php
tests/phpunit/includes/media/GIFMetadataExtractorTest.php
tests/phpunit/includes/media/GIFTest.php
tests/phpunit/includes/media/JpegTest.php
tests/phpunit/includes/media/PNGTest.php
tests/phpunit/includes/media/TiffTest.php
tests/phpunit/includes/media/XCFTest.php