ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
|
Php library to Bake the PNG Images. More...
Public Member Functions | |
__construct ($contents) | |
Prepares file for handling metadata. More... | |
checkChunks ($type, $check) | |
Checks if a key already exists in the chunk of said type. More... | |
addChunk ($chunkType, $key, $value) | |
Add a chunk by type with given key and text. More... | |
removeChunks ($chunkType, $key, $png) | |
removes a chunk by type with given key and text More... | |
extractBadgeInfo ($png, $key='openbadges') | |
Extracts the baked PNG info by the Key. More... | |
Private Attributes | |
$_contents | |
$_size | |
$_chunks | |
Php library to Bake the PNG Images.
Definition at line 7 of file baker.lib.php.
PNGImageBaker::__construct | ( | $contents | ) |
Prepares file for handling metadata.
Verifies that this file is a valid PNG file. Unpacks file chunks and reads them into an array.
string | $contents | File content as a string |
Definition at line 20 of file baker.lib.php.
References $contents, $header, and array.
PNGImageBaker::addChunk | ( | $chunkType, | |
$key, | |||
$value | |||
) |
Add a chunk by type with given key and text.
string | $chunkType | Chunk type, like iTXt, tEXt, etc. |
string | $key | Keyword that needs to be added. |
string | $value | Currently an assertion URL that is added to an image metadata. |
Definition at line 73 of file baker.lib.php.
PNGImageBaker::checkChunks | ( | $type, | |
$check | |||
) |
Checks if a key already exists in the chunk of said type.
We need to avoid writing same keyword into file chunks.
string | $type | Chunk type, like iTXt, tEXt, etc. |
string | $check | Keyword that needs to be checked. |
Definition at line 50 of file baker.lib.php.
References $data, $key, and $type.
PNGImageBaker::extractBadgeInfo | ( | $png, | |
$key = 'openbadges' |
|||
) |
Extracts the baked PNG info by the Key.
string | $png | the png image |
string | $key | Keyword that needs to be searched. |
Definition at line 142 of file baker.lib.php.
PNGImageBaker::removeChunks | ( | $chunkType, | |
$key, | |||
$png | |||
) |
removes a chunk by type with given key and text
string | $chunkType | Chunk type, like iTXt, tEXt, etc. |
string | $key | Keyword that needs to be deleted. |
string | $png | the png image. |
Definition at line 95 of file baker.lib.php.
|
private |
Definition at line 11 of file baker.lib.php.
|
private |
Definition at line 9 of file baker.lib.php.
|
private |
Definition at line 10 of file baker.lib.php.