annotate e2gallerypro/e2upload/Backend/Assets/getid3/module.graphic.pcd.php @ 25:6a3d04638a89 judyates

mailto links.
author Robert McIntyre <rlm@mit.edu>
date Sat, 19 Jul 2014 14:35:52 -0400
parents 3f6b44aa6b35
children
rev   line source
rlm@3 1 <?php
rlm@3 2 // +----------------------------------------------------------------------+
rlm@3 3 // | PHP version 5 |
rlm@3 4 // +----------------------------------------------------------------------+
rlm@3 5 // | Copyright (c) 2002-2006 James Heinrich, Allan Hansen |
rlm@3 6 // +----------------------------------------------------------------------+
rlm@3 7 // | This source file is subject to version 2 of the GPL license, |
rlm@3 8 // | that is bundled with this package in the file license.txt and is |
rlm@3 9 // | available through the world-wide-web at the following url: |
rlm@3 10 // | http://www.gnu.org/copyleft/gpl.html |
rlm@3 11 // +----------------------------------------------------------------------+
rlm@3 12 // | getID3() - http://getid3.sourceforge.net or http://www.getid3.org |
rlm@3 13 // +----------------------------------------------------------------------+
rlm@3 14 // | Authors: James Heinrich <infoØgetid3*org> |
rlm@3 15 // | Allan Hansen <ahØartemis*dk> |
rlm@3 16 // +----------------------------------------------------------------------+
rlm@3 17 // | module.graphic.pcd.php |
rlm@3 18 // | Module for analyzing PhotoCD (PCD) Image files. |
rlm@3 19 // | dependencies: NONE |
rlm@3 20 // +----------------------------------------------------------------------+
rlm@3 21 //
rlm@3 22 // $Id: module.graphic.pcd.php,v 1.2 2006/11/02 10:48:02 ah Exp $
rlm@3 23
rlm@3 24
rlm@3 25
rlm@3 26 class getid3_pcd extends getid3_handler
rlm@3 27 {
rlm@3 28
rlm@3 29
rlm@3 30 public function Analyze() {
rlm@3 31
rlm@3 32 $getid3 = $this->getid3;
rlm@3 33
rlm@3 34 $getid3->info['fileformat'] = 'pcd';
rlm@3 35 $getid3->info['video']['dataformat'] = 'pcd';
rlm@3 36 $getid3->info['video']['lossless'] = false;
rlm@3 37
rlm@3 38 fseek($getid3->fp, $getid3->info['avdataoffset'] + 72, SEEK_SET);
rlm@3 39
rlm@3 40 $pcd_flags = fread($getid3->fp, 1);
rlm@3 41 $pcd_is_vertical = ((ord($pcd_flags) & 0x01) ? true : false);
rlm@3 42
rlm@3 43 if ($pcd_is_vertical) {
rlm@3 44 $getid3->info['video']['resolution_x'] = 3072;
rlm@3 45 $getid3->info['video']['resolution_y'] = 2048;
rlm@3 46 } else {
rlm@3 47 $getid3->info['video']['resolution_x'] = 2048;
rlm@3 48 $getid3->info['video']['resolution_y'] = 3072;
rlm@3 49 }
rlm@3 50
rlm@3 51 }
rlm@3 52
rlm@3 53
rlm@3 54 }
rlm@3 55
rlm@3 56 ?>