9 protected function setUp() {
19 $file = $this->
dataFile(
'README',
'image/jpeg' );
20 $res = $this->
handler->getMetadata( $file, $this->filePath .
'README' );
25 $file = $this->
dataFile(
'test.jpg',
'image/jpeg' );
26 $res = $this->
handler->getMetadata( $file, $this->filePath .
'test.jpg' );
28 $expected =
'a:7:{s:16:"ImageDescription";s:9:"Test file";s:11:"XResolution";s:4:"72/1";s:11:"YResolution";s:4:"72/1";s:14:"ResolutionUnit";i:2;s:16:"YCbCrPositioning";i:1;s:15:"JPEGFileComment";a:1:{i:0;s:17:"Created with GIMP";}s:22:"MEDIAWIKI_EXIF_VERSION";i:2;}';
39 $file = $this->
dataFile(
'test.jpg',
'image/jpeg' );
42 'ImageDescription' =>
'Test file',
43 'XResolution' =>
'72/1',
44 'YResolution' =>
'72/1',
45 'ResolutionUnit' => 2,
46 'YCbCrPositioning' => 1,
47 'JPEGFileComment' => [
52 $this->assertEquals(
$res, $expected );
60 $sourceFilename, $controlFilename, $newProfileFilename, $oldProfileName
65 $this->markTestSkipped(
"Exiftool not installed, cannot test ICC profile swapping" );
68 $this->
setMwGlobals(
'wgUseTinyRGBForJPGThumbnails',
true );
70 $sourceFilepath = $this->filePath . $sourceFilename;
71 $controlFilepath = $this->filePath . $controlFilename;
72 $profileFilepath = $this->filePath . $newProfileFilename;
75 copy( $sourceFilepath, $filepath );
77 $file = $this->
dataFile( $sourceFilename,
'image/jpeg' );
86 sha1( file_get_contents( $filepath ) ),
87 sha1( file_get_contents( $controlFilepath ) )
109 'missingprofile.jpg',
unserialize( $serialized)
and give any other recipients of the Program a copy of this License along with the Program You may charge a fee for the physical act of transferring a copy
$wgExiftool
Path to exiftool binary.
testJpegMetadataExtraction()
testSwappingICCProfile( $sourceFilename, $controlFilename, $newProfileFilename, $oldProfileName)
provideSwappingICCProfile JpegHandler::swapICCProfile
testGetIndependentMetaArray()
JpegHandler::getCommonMetaArray.
provideSwappingICCProfile()
this hook is for auditing only or null if authentication failed before getting that far or null if we can t even determine that probably a stub it is not rendered in wiki pages or galleries in category pages allow injecting custom HTML after the section Any uses of the hook need to handle escaping see BaseTemplate::getToolbox and BaseTemplate::makeListItem for details on the format of individual items inside of this array or by returning and letting standard HTTP rendering take place modifiable or by returning false and taking over the output modifiable modifiable after all normalizations have been except for the $wgMaxImageArea check set to true or false to override the $wgMaxImageArea check result gives extension the possibility to transform it themselves set to a MediaTransformOutput the error message to be returned in an array you should do so by altering $wgNamespaceProtection and $wgNamespaceContentModels outside the handler