MediaWiki  REL1_19
PNGMetadataExtractorTest Class Reference
Inheritance diagram for PNGMetadataExtractorTest:
Collaboration diagram for PNGMetadataExtractorTest:

List of all members.

Public Member Functions

 setUp ()
 testApngAnimationMetadata ()
 Given an animated APNG image file check it gets animated metadata right.
 testPngBitDepth1 ()
 testPngBitDepth8 ()
 testPngGreyscaleColour ()
 testPngGreyscaleNoAlphaColour ()
 testPngIndexColour ()
 testPngNativeText ()
 Test tEXt tag (Uncompressed textual metadata)
 testPngNativeTextNonAscii ()
 tEXt tags must be encoded iso-8859-1 (vs iTXt which are utf-8) Make sure non-ascii characters get converted properly
 testPngNativetZtxt ()
 Tests zTXt tag (compressed textual metadata)
 testPngRgbColour ()
 testPngRgbNoAlphaColour ()
 testStaticPngAnimationMetadata ()
 Test extraction of pHYs tags, which can tell what the actual resolution of the image is (aka in dots per meter).

Detailed Description

Definition at line 2 of file PNGMetadataExtractorTest.php.


Member Function Documentation

Given an animated APNG image file check it gets animated metadata right.

Definition at line 91 of file PNGMetadataExtractorTest.php.

Test tEXt tag (Uncompressed textual metadata)

Definition at line 25 of file PNGMetadataExtractorTest.php.

References PNGMetadataExtractor\getMetadata().

Here is the call graph for this function:

tEXt tags must be encoded iso-8859-1 (vs iTXt which are utf-8) Make sure non-ascii characters get converted properly

Definition at line 42 of file PNGMetadataExtractorTest.php.

References PNGMetadataExtractor\getMetadata().

Here is the call graph for this function:

Tests zTXt tag (compressed textual metadata)

Definition at line 10 of file PNGMetadataExtractorTest.php.

References PNGMetadataExtractor\getMetadata().

Here is the call graph for this function:

Test extraction of pHYs tags, which can tell what the actual resolution of the image is (aka in dots per meter).

function testPngPhysTag () { $meta = PNGMetadataExtractor::getMetadata( $this->filePath . 'Png-native-test.png' );

$this->assertArrayHasKey( 'text', $meta ); $meta = $meta['text'];

$this->assertEquals( '2835/100', $meta['XResolution'] ); $this->assertEquals( '2835/100', $meta['YResolution'] ); $this->assertEquals( 3, $meta['ResolutionUnit'] ); // 3 = cm }

/** Given a normal static PNG, check the animation metadata returned.

Definition at line 78 of file PNGMetadataExtractorTest.php.


The documentation for this class was generated from the following file: