blob: bf8288febcd7b201dac0a41f64fe5bd95ad7a736 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
<?php
/* vim:set tabstop=8 softtabstop=8 shiftwidth=8 noexpandtab: */
// +----------------------------------------------------------------------+
// | 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;
}
}
}
?>
|