20 $res = $this->
handler->getMetadata(
null, $this->filePath .
'/README' );
31 $file = $this->
dataFile( $filename,
'image/png' );
32 $actual = $this->
handler->isAnimatedImage( $file );
33 $this->assertEquals( $expected, $actual );
38 [
'Animated_PNG_example_bouncing_beach_ball.png',
true ],
39 [
'1bit-png.png',
false ],
50 $file = $this->
dataFile( $filename,
'image/png' );
51 $actual = $this->
handler->getImageArea( $file, $file->getWidth(), $file->getHeight() );
52 $this->assertEquals( $expected, $actual );
57 [
'1bit-png.png', 2500 ],
58 [
'greyscale-png.png', 2500 ],
59 [
'Png-native-test.png', 126000 ],
60 [
'Animated_PNG_example_bouncing_beach_ball.png', 10000 ],
71 $actual = $this->
handler->isMetadataValid(
null, $metadata );
72 $this->assertEquals( $expected, $actual );
83 'a:6:{s:10:"frameCount";i:0;s:9:"loopCount";i:1;s:8:"duration";d:0;s:8:"bitDepth";i:8;s:9:"colorType";s:10:"truecolour";s:8:"metadata";a:1:{s:15:"_MW_PNG_VERSION";i:1;}}',
97 $file = $this->
dataFile( $filename,
'image/png' );
98 $actual = $this->
handler->getMetadata( $file,
"$this->filePath/$filename" );
100 $this->assertEquals( ( $expected ), ( $actual ) );
108 'a:6:{s:10:"frameCount";i:0;s:9:"loopCount";i:1;s:8:"duration";d:0;s:8:"bitDepth";i:8;s:9:"colorType";s:10:"truecolour";s:8:"metadata";a:1:{s:15:"_MW_PNG_VERSION";i:1;}}'
112 'a:6:{s:10:"frameCount";i:0;s:9:"loopCount";i:1;s:8:"duration";d:0;s:8:"bitDepth";i:1;s:9:"colorType";s:14:"index-coloured";s:8:"metadata";a:2:{s:12:"SerialNumber";s:9:"123456789";s:15:"_MW_PNG_VERSION";i:1;}}'
125 $file = $this->
dataFile( $filename,
'image/png' );
126 $actual = $this->
handler->getCommonMetaArray( $file );
127 $this->assertEquals( $expected, $actual );
132 [
'rgb-na-png.png', [] ],
135 'SerialNumber' =>
'123456789',
148 $file = $this->
dataFile( $filename,
'image/png' );
149 $actualLength = $file->getLength();
150 $this->assertEquals( $expectedLength, $actualLength,
'', 0.00001 );
155 [
'Animated_PNG_example_bouncing_beach_ball.png', 1.5 ],
156 [
'Png-native-test.png', 0.0 ],
157 [
'greyscale-png.png', 0.0 ],
158 [
'1bit-png.png', 0.0 ],