download getid3.jpg.php
Language: PHP
LOC: 35
Project Info
Tunez
Server: SourceForge
Type: cvs
...tunez\tunez\tunez\html\id3\
   getid3.aac.php
   getid3.ape.php
   getid3.asf.php
   getid3.au.php
   getid3.avr.php
   getid3.bmp.php
   getid3.bonk.php
   getid3.check.php
   getid3.exe.php
   getid3.flac.php
   getid3.frames.php
   getid3.functions.php
   getid3.getimagesize.php
   getid3.gif.php
   getid3.id3v1.php
   getid3.id3v2.php
   getid3.iso.php
   getid3.jpg.php
   getid3.la.php
   getid3.lookup.php
   getid3.lpac.php
   getid3.lyrics3.php
   getid3.matroska.php
   getid3.midi.php
   getid3.mod.php
   getid3.monkey.php
   getid3.mp3.php
   getid3.mpc.php
   getid3.mpeg.php
   getid3.nsv.php
   getid3.ogg.php
   getid3.ogginfo.php
   getid3.optimfrog.php
   getid3.php
   getid3.png.php
   getid3.putid3.php
   getid3.quicktime.php
   getid3.rar.php
   getid3.real.php
   getid3.rgad.php
   getid3.riff.php
   getid3.shorten.php
   getid3.swf.php
   getid3.thumbnail.php
   getid3.voc.php
   getid3.vqf.php
   getid3.write.php
   getid3.zip.php

<?php
/////////////////////////////////////////////////////////////////
/// getID3() by James Heinrich <info@getid3.org>               //
//  available at http://getid3.sourceforge.net                ///
//            or http://www.getid3.org                        ///
/////////////////////////////////////////////////////////////////
//                                                             //
// getid3.jpg.php - part of getID3()                           //
// See getid3.readme.txt for more details                      //
//                                                             //
/////////////////////////////////////////////////////////////////

function getJPGHeaderFilepointer(&$fd, &$ThisFileInfo) {
	$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);
	require_once(GETID3_INCLUDEPATH.'getid3.getimagesize.php');

	list($width, $height, $type) = 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'] .= "\n".strip_tags($errors);
					unset($ThisFileInfo['jpg']['exif']);
				}
				ob_end_clean();

			} else {

				$ThisFileInfo['warning'] .= "\n".'EXIF parsing only available when compiled with --enable-exif (or php_exif.dll enabled for Windows)';

			}

		} else {

			$ThisFileInfo['warning'] .= "\n".'EXIF parsing only available in PHP v4.2.0 and higher (you are using PHP v'.phpversion().') compiled with --enable-exif (or php_exif.dll enabled for Windows)';

		}

		return true;

	}

	unset($ThisFileInfo['fileformat']);
	return false;
}

?>

About Koders | Resources | Downloads | Support | Black Duck | Submit Project | Terms of Service | DMCA | Privacy Policy | Site Map| Contact Us