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)
committerAaron Schulz <aschulz@wikimedia.org>
Tue, 23 May 2017 19:18:58 +0000 (19:18 +0000)
commit84e4d7508893c37d7d192eda6da849f0876475a6
tree891862f421cbbd0488f56ce1c2084f60f38b0209
parentc6e2039a9f8d4dcc311e2a3f76bf8bea312aaac0
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