Mercurial > judyates
diff e2gallerypro/e2upload/Backend/Assets/getid3/module.graphic.jpeg.php @ 3:3f6b44aa6b35 judyates
[svn r4] added ability to buy stuff, from a Prints page, but it doesn't work well with the css, and it also has not been fitted into the perl make system.
author | rlm |
---|---|
date | Mon, 22 Feb 2010 08:02:39 -0500 |
parents | |
children |
line wrap: on
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/e2gallerypro/e2upload/Backend/Assets/getid3/module.graphic.jpeg.php Mon Feb 22 08:02:39 2010 -0500 1.3 @@ -0,0 +1,62 @@ 1.4 +<?php 1.5 +// +----------------------------------------------------------------------+ 1.6 +// | PHP version 5 | 1.7 +// +----------------------------------------------------------------------+ 1.8 +// | Copyright (c) 2002-2006 James Heinrich, Allan Hansen | 1.9 +// +----------------------------------------------------------------------+ 1.10 +// | This source file is subject to version 2 of the GPL license, | 1.11 +// | that is bundled with this package in the file license.txt and is | 1.12 +// | available through the world-wide-web at the following url: | 1.13 +// | http://www.gnu.org/copyleft/gpl.html | 1.14 +// +----------------------------------------------------------------------+ 1.15 +// | getID3() - http://getid3.sourceforge.net or http://www.getid3.org | 1.16 +// +----------------------------------------------------------------------+ 1.17 +// | Authors: James Heinrich <infoØgetid3*org> | 1.18 +// | Allan Hansen <ahØartemis*dk> | 1.19 +// +----------------------------------------------------------------------+ 1.20 +// | module.graphic.jpeg.php | 1.21 +// | Module for analyzing JPEG graphic files. | 1.22 +// | dependencies: exif support in PHP (optional) | 1.23 +// +----------------------------------------------------------------------+ 1.24 +// 1.25 +// $Id: module.graphic.jpeg.php,v 1.4 2006/11/02 10:48:02 ah Exp $ 1.26 + 1.27 + 1.28 + 1.29 +class getid3_jpeg extends getid3_handler 1.30 +{ 1.31 + 1.32 + public function Analyze() { 1.33 + 1.34 + $getid3 = $this->getid3; 1.35 + 1.36 + $getid3->info['fileformat'] = 'jpg'; 1.37 + $getid3->info['video']['dataformat'] = 'jpg'; 1.38 + $getid3->info['video']['lossless'] = false; 1.39 + $getid3->info['video']['bits_per_sample'] = 24; 1.40 + $getid3->info['video']['pixel_aspect_ratio'] = (float)1; 1.41 + 1.42 + fseek($getid3->fp, $getid3->info['avdataoffset'], SEEK_SET); 1.43 + 1.44 + list($getid3->info['video']['resolution_x'], $getid3->info['video']['resolution_y'], $type) = getimagesize($getid3->filename); 1.45 + 1.46 + if ($type != 2) { 1.47 + throw new getid3_exception('File detected as JPEG, but is currupt.'); 1.48 + } 1.49 + 1.50 + if (function_exists('exif_read_data')) { 1.51 + 1.52 + $getid3->info['jpg']['exif'] = exif_read_data($getid3->filename, '', true, false); 1.53 + 1.54 + } else { 1.55 + 1.56 + $getid3->warning('EXIF parsing only available when compiled with --enable-exif (or php_exif.dll enabled for Windows).'); 1.57 + } 1.58 + 1.59 + return true; 1.60 + } 1.61 + 1.62 +} 1.63 + 1.64 + 1.65 +?> 1.66 \ No newline at end of file