summaryrefslogtreecommitdiffstats
path: root/modules/getid3/module.graphic.pcd.php
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-04-23 07:31:05 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-04-23 07:31:05 +0000
commita31560aec4f004e58930277758f5412d86c62adc (patch)
tree845ff6947d26b22a0f4527901dbefc97bca89d78 /modules/getid3/module.graphic.pcd.php
parent8b27d66add7ca9ba57d7e9488612cb54be4b11c1 (diff)
downloadampache-a31560aec4f004e58930277758f5412d86c62adc.tar.gz
ampache-a31560aec4f004e58930277758f5412d86c62adc.tar.bz2
ampache-a31560aec4f004e58930277758f5412d86c62adc.zip
it technically logs in and streams.. but thats it, complete rewrite almost everything broken
Diffstat (limited to 'modules/getid3/module.graphic.pcd.php')
-rw-r--r--modules/getid3/module.graphic.pcd.php56
1 files changed, 56 insertions, 0 deletions
diff --git a/modules/getid3/module.graphic.pcd.php b/modules/getid3/module.graphic.pcd.php
new file mode 100644
index 00000000..dacb6c8a
--- /dev/null
+++ b/modules/getid3/module.graphic.pcd.php
@@ -0,0 +1,56 @@
+<?php
+// +----------------------------------------------------------------------+
+// | PHP version 5 |
+// +----------------------------------------------------------------------+
+// | Copyright (c) 2002-2006 James Heinrich, Allan Hansen |
+// +----------------------------------------------------------------------+
+// | This source file is subject to version 2 of the GPL license, |
+// | that is bundled with this package in the file license.txt and is |
+// | available through the world-wide-web at the following url: |
+// | http://www.gnu.org/copyleft/gpl.html |
+// +----------------------------------------------------------------------+
+// | getID3() - http://getid3.sourceforge.net or http://www.getid3.org |
+// +----------------------------------------------------------------------+
+// | Authors: James Heinrich <infoØgetid3*org> |
+// | Allan Hansen <ahØartemis*dk> |
+// +----------------------------------------------------------------------+
+// | module.graphic.pcd.php |
+// | Module for analyzing PhotoCD (PCD) Image files. |
+// | dependencies: NONE |
+// +----------------------------------------------------------------------+
+//
+// $Id: module.graphic.pcd.php,v 1.2 2006/11/02 10:48:02 ah Exp $
+
+
+
+class getid3_pcd extends getid3_handler
+{
+
+
+ public function Analyze() {
+
+ $getid3 = $this->getid3;
+
+ $getid3->info['fileformat'] = 'pcd';
+ $getid3->info['video']['dataformat'] = 'pcd';
+ $getid3->info['video']['lossless'] = false;
+
+ fseek($getid3->fp, $getid3->info['avdataoffset'] + 72, SEEK_SET);
+
+ $pcd_flags = fread($getid3->fp, 1);
+ $pcd_is_vertical = ((ord($pcd_flags) & 0x01) ? true : false);
+
+ if ($pcd_is_vertical) {
+ $getid3->info['video']['resolution_x'] = 3072;
+ $getid3->info['video']['resolution_y'] = 2048;
+ } else {
+ $getid3->info['video']['resolution_x'] = 2048;
+ $getid3->info['video']['resolution_y'] = 3072;
+ }
+
+ }
+
+
+}
+
+?> \ No newline at end of file