ILIAS  Release_4_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
getid3_jpg Class Reference

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

+ Collaboration diagram for getid3_jpg:

Public Member Functions

 getid3_jpg (&$fd, &$ThisFileInfo)

Detailed Description

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

Definition at line 17 of file module.graphic.jpg.php.

Member Function Documentation

getid3_jpg::getid3_jpg ( $fd,
$ThisFileInfo 
)

Definition at line 21 of file module.graphic.jpg.php.

References $errors, $type, and getid3_lib\GetDataImageSize().

{
$ThisFileInfo['fileformat'] = 'jpg';
$ThisFileInfo['video']['dataformat'] = 'jpg';
$ThisFileInfo['video']['lossless'] = false;
$ThisFileInfo['video']['bits_per_sample'] = 24;
$ThisFileInfo['video']['pixel_aspect_ratio'] = (float) 1;
fseek($fd, $ThisFileInfo['avdataoffset'], SEEK_SET);
list($width, $height, $type) = getid3_lib::GetDataImageSize(fread($fd, $ThisFileInfo['filesize']));
if ($type == 2) {
$ThisFileInfo['video']['resolution_x'] = $width;
$ThisFileInfo['video']['resolution_y'] = $height;
if (version_compare(phpversion(), '4.2.0', '>=')) {
if (function_exists('exif_read_data')) {
ob_start();
$ThisFileInfo['jpg']['exif'] = exif_read_data($ThisFileInfo['filenamepath'], '', true, false);
$errors = ob_get_contents();
if ($errors) {
$ThisFileInfo['error'][] = strip_tags($errors);
unset($ThisFileInfo['jpg']['exif']);
}
ob_end_clean();
} else {
$ThisFileInfo['warning'][] = 'EXIF parsing only available when '.(GETID3_OS_ISWINDOWS ? 'php_exif.dll enabled' : 'compiled with --enable-exif');
}
} else {
$ThisFileInfo['warning'][] = 'EXIF parsing only available in PHP v4.2.0 and higher compiled with --enable-exif (or php_exif.dll enabled for Windows). You are using PHP v'.phpversion();
}
return true;
}
unset($ThisFileInfo['fileformat']);
return false;
}

+ Here is the call graph for this function:


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