ILIAS  Release_4_4_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
getid3_svg Class Reference

getID3() by James Heinrich info@.nosp@m.geti.nosp@m.d3.or.nosp@m.g // More...

+ Collaboration diagram for getid3_svg:

Public Member Functions

 getid3_svg (&$fd, &$ThisFileInfo)

Detailed Description

getID3() by James Heinrich info@.nosp@m.geti.nosp@m.d3.or.nosp@m.g //

Definition at line 18 of file module.graphic.svg.php.

Member Function Documentation

getid3_svg::getid3_svg ( $fd,
$ThisFileInfo 
)

Definition at line 22 of file module.graphic.svg.php.

References getid3_lib\LittleEndian2Int().

{
fseek($fd, $ThisFileInfo['avdataoffset'], SEEK_SET);
// I'm making this up, please modify as appropriate
$SVGheader = fread($fd, 32);
$ThisFileInfo['svg']['magic'] = substr($SVGheader, 0, 4);
if ($ThisFileInfo['svg']['magic'] == 'aBcD') {
$ThisFileInfo['fileformat'] = 'svg';
$ThisFileInfo['video']['dataformat'] = 'svg';
$ThisFileInfo['video']['lossless'] = true;
$ThisFileInfo['video']['bits_per_sample'] = 24;
$ThisFileInfo['video']['pixel_aspect_ratio'] = (float) 1;
$ThisFileInfo['svg']['width'] = getid3_lib::LittleEndian2Int(substr($fileData, 4, 4));
$ThisFileInfo['svg']['height'] = getid3_lib::LittleEndian2Int(substr($fileData, 8, 4));
$ThisFileInfo['video']['resolution_x'] = $ThisFileInfo['svg']['width'];
$ThisFileInfo['video']['resolution_y'] = $ThisFileInfo['svg']['height'];
return true;
}
$ThisFileInfo['error'][] = 'Did not find SVG magic bytes "aBcD" at '.$ThisFileInfo['avdataoffset'];
unset($ThisFileInfo['fileformat']);
return false;
}

+ Here is the call graph for this function:


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