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;}';
38 $file = $this->
dataFile(
'test.jpg',
'image/jpeg' );
41 'ImageDescription' =>
'Test file',
42 'XResolution' =>
'72/1',
43 'YResolution' =>
'72/1',
44 'ResolutionUnit' => 2,
45 'YCbCrPositioning' => 1,
46 'JPEGFileComment' => [
51 $this->assertEquals(
$res, $expected );
59 $sourceFilename, $controlFilename, $newProfileFilename, $oldProfileName
64 $this->markTestSkipped(
"Exiftool not installed, cannot test ICC profile swapping" );
67 $this->
setMwGlobals(
'wgUseTinyRGBForJPGThumbnails',
true );
69 $sourceFilepath = $this->filePath . $sourceFilename;
70 $controlFilepath = $this->filePath . $controlFilename;
71 $profileFilepath = $this->filePath . $newProfileFilename;
74 copy( $sourceFilepath, $filepath );
76 $file = $this->
dataFile( $sourceFilename,
'image/jpeg' );
85 sha1( file_get_contents( $filepath ) ),
86 sha1( file_get_contents( $controlFilepath ) )
108 '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