You can subscribe to this list here.
| 2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(121) |
Jun
(112) |
Jul
(42) |
Aug
(2) |
Sep
(2) |
Oct
(22) |
Nov
(2) |
Dec
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2005 |
Jan
(7) |
Feb
(26) |
Mar
|
Apr
(1) |
May
(9) |
Jun
(3) |
Jul
(10) |
Aug
(6) |
Sep
(12) |
Oct
(50) |
Nov
|
Dec
|
| 2006 |
Jan
(8) |
Feb
(4) |
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
(14) |
Aug
|
Sep
(12) |
Oct
|
Nov
(28) |
Dec
(24) |
| 2007 |
Jan
(1) |
Feb
|
Mar
(2) |
Apr
(3) |
May
|
Jun
(4) |
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
|
| 2008 |
Jan
(1) |
Feb
(1) |
Mar
|
Apr
(1) |
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2009 |
Jan
|
Feb
|
Mar
(10) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2010 |
Jan
|
Feb
(9) |
Mar
(1) |
Apr
|
May
|
Jun
(1) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(2) |
|
From: <lso...@us...> - 2010-12-06 14:25:07
|
Revision: 537
http://pel.svn.sourceforge.net/pel/?rev=537&view=rev
Author: lsolesen
Date: 2010-12-06 14:25:00 +0000 (Mon, 06 Dec 2010)
Log Message:
-----------
Deleted unneccessry files
Removed Paths:
-------------
web/feedParser.php
web/htdocs/footer.php
web/htdocs/links.php
web/htdocs/navbar.php
web/htdocs/pel.css
web/xmlParser.php
Deleted: web/feedParser.php
===================================================================
--- web/feedParser.php 2010-12-06 14:23:15 UTC (rev 536)
+++ web/feedParser.php 2010-12-06 14:25:00 UTC (rev 537)
@@ -1,401 +0,0 @@
-<?
-/*
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-/* Written by Reverend Jim (ji...@re...)
- *
- * http://revjim.net/code/feedParser/
- */
-
-
-class feedParser {
-
- var $version = "0.5";
- var $entities = array(
- 'nbsp' => " ",
- 'iexcl' => "¡",
- 'cent' => "¢",
- 'pound' => "£",
- 'curren' => "¤",
- 'yen' => "¥",
- 'brvbar' => "¦",
- 'sect' => "§",
- 'uml' => "¨",
- 'copy' => "©",
- 'ordf' => "ª",
- 'laquo' => "«",
- 'not' => "¬",
- 'shy' => "­",
- 'reg' => "®",
- 'macr' => "¯",
- 'deg' => "°",
- 'plusmn' => "±",
- 'sup2' => "²",
- 'sup3' => "³",
- 'acute' => "´",
- 'micro' => "µ",
- 'para' => "¶",
- 'middot' => "·",
- 'cedil' => "¸",
- 'sup1' => "¹",
- 'ordm' => "º",
- 'raquo' => "»",
- 'frac14' => "¼",
- 'frac12' => "½",
- 'frac34' => "¾",
- 'iquest' => "¿",
- 'Agrave' => "À",
- 'Aacute' => "Á",
- 'Acirc' => "Â",
- 'Atilde' => "Ã",
- 'Auml' => "Ä",
- 'Aring' => "Å",
- 'AElig' => "Æ",
- 'Ccedil' => "Ç",
- 'Egrave' => "È",
- 'Eacute' => "É",
- 'Ecirc' => "Ê",
- 'Euml' => "Ë",
- 'Igrave' => "Ì",
- 'Iacute' => "Í",
- 'Icirc' => "Î",
- 'Iuml' => "Ï",
- 'ETH' => "Ð",
- 'Ntilde' => "Ñ",
- 'Ograve' => "Ò",
- 'Oacute' => "Ó",
- 'Ocirc' => "Ô",
- 'Otilde' => "Õ",
- 'Ouml' => "Ö",
- 'times' => "×",
- 'Oslash' => "Ø",
- 'Ugrave' => "Ù",
- 'Uacute' => "Ú",
- 'Ucirc' => "Û",
- 'Uuml' => "Ü",
- 'Yacute' => "Ý",
- 'THORN' => "Þ",
- 'szlig' => "ß",
- 'agrave' => "à",
- 'aacute' => "á",
- 'acirc' => "â",
- 'atilde' => "ã",
- 'auml' => "ä",
- 'aring' => "å",
- 'aelig' => "æ",
- 'ccedil' => "ç",
- 'egrave' => "è",
- 'eacute' => "é",
- 'ecirc' => "ê",
- 'euml' => "ë",
- 'igrave' => "ì",
- 'iacute' => "í",
- 'icirc' => "î",
- 'iuml' => "ï",
- 'eth' => "ð",
- 'ntilde' => "ñ",
- 'ograve' => "ò",
- 'oacute' => "ó",
- 'ocirc' => "ô",
- 'otilde' => "õ",
- 'ouml' => "ö",
- 'divide' => "÷",
- 'oslash' => "ø",
- 'ugrave' => "ù",
- 'uacute' => "ú",
- 'ucirc' => "û",
- 'uuml' => "ü",
- 'yacute' => "ý",
- 'thorn' => "þ",
- 'yuml' => "ÿ"
- );
-
- var $namespaces = array(
- 'DC' => 'http://purl.org/dc/elements/1.1/',
- 'RDF' => 'http://www.w3.org/1999/02/22-rdf-syntax-ns#',
- 'RSS' => 'http://purl.org/rss/1.0/',
- 'RSS2'=> 'http://backend.userland.com/rss2',
- 'RDF2' => 'http://my.netscape.com/rdf/simple/0.9/'
- );
-
- function buildStruct($xmldata) {
- // Create a parser object
- $p = new XMLParser;
-
- // Define our known namespaces
- foreach ($this->namespaces as $space => $uri) {
- $p->definens($space,$uri);
- }
-
- // Define base namespace
- $p->definens("UNDEF");
-
- $this->parseEntities($xmldata);
-
- // Tell the parser to get the file.
- $p->setXmlData($xmldata);
-
- // Tell the parser to build the tree.
- $p->buildXmlTree();
-
- // Spit the tree out so we can see it
- return $p->getXmlTree();
-
- }
-
- function parseEntities(&$data) {
-
- foreach($this->entities as $entity => $replace) {
- $data = preg_replace('/&' . $entity . ';/',$replace,$data);
- }
-
- $data = preg_replace('/&[ ]*;/','',$data);
-
- }
-
-
- function parseFeed($xmldata) {
- $data =& $this->buildStruct(&$xmldata);
- if(is_array($data)) {
- foreach($data as $child) {
- if(is_array($child)) {
- switch($child['tag']) {
- case "RSS:RSS":
- case "UNDEF:RSS":
- case "RSS2:RSS":
- $info = $this->parseRSS(&$child);
- break;
- case "RDF:RDF":
- $info = $this->parseRDF(&$child);
- break;
- default:
- $info["warning"] .= "Unknown document format: " . $child['tag'] . "\n";
- break;
- }
- }
- }
- }
-
- return $info;
-
- }
-
- function parseRDF(&$data) {
- if(is_array($data['children'])) {
- foreach($data['children'] as $child) {
- if(is_array($child)) {
- switch($child['tag']) {
- case "RSS:CHANNEL":
- case "RDF2:CHANNEL":
- $channel = $this->getRDFChannel(&$child);
- break;
- case "RSS:ITEM":
- case "RDF2:ITEM":
- $item[] = $this->getRDFItem(&$child);
- break;
- default:
- break;
- }
- }
- }
-
- }
-
- return array('channel' => $channel, 'item' => $item);
-
- }
-
- function parseRSS(&$data) {
- if(is_array($data['children'])) {
- foreach($data['children'] as $child) {
- if(is_array($child)) {
- switch($child['tag']) {
- case "RSS:CHANNEL":
- case "RSS2:CHANNEL":
- case "UNDEF:CHANNEL":
- $info = $this->getRSSChannel(&$child);
- break;
- default:
- break;
- }
- }
- }
-
- }
-
- return $info;
-
- }
-
- function getRDFChannel($data) {
- if(is_array($data['children'])) {
- foreach($data['children'] as $child) {
- if(is_array($child)) {
- switch($child['tag']) {
- case "RSS:TITLE":
- case "RDF2:TITLE":
- $channel['title'] = $child['children'][0];
- break;
- case "RSS:LINK":
- case "RDF2:LINK":
- $channel['link'] = $child['children'][0];
- break;
- case "RSS:DESCRIPTION":
- case "RDF2:DESCRIPTION":
- $channel['description'] = $child['children'][0];
- break;
- case "RSS:WEBMASTER":
- $channel['creator'] = $child['children'][0];
- break;
- default:
- break;
- }
- }
- }
- }
-
- return $channel;
- }
-
- function getRSSChannel($data) {
- if(is_array($data['children'])) {
- foreach($data['children'] as $child) {
- if(is_array($child)) {
- switch($child['tag']) {
- case "UNDEF:TITLE":
- case "RSS:TITLE":
- case "RSS2:TITLE":
- $channel['title'] = $child['children'][0];
- break;
- case "UNDEF:LINK":
- case "RSS:LINK":
- case "RSS2:LINK":
- $channel['link'] = $child['children'][0];
- break;
- case "UNDEF:DESCRIPTION":
- case "RSS:DESCRIPTION":
- case "RSS2:DESCRIPTION":
- $channel['description'] = $child['children'][0];
- break;
- case "UNDEF:ITEM":
- case "RSS:ITEM":
- case "RSS2:ITEM":
- $item[] = $this->getRSSItem(&$child);
- break;
- case "UNDEF:LASTBUILDDATE":
- case "RSS:LASTBUILDDATE":
- case "RSS2:LASTBUILDDATE":
- $channel['lastbuilddate'] = strtotime($child['children'][0]);
- break;
- default:
- break;
- }
- }
- }
- }
-
- return array('channel' => $channel, 'item' => $item);
- }
-
- function getRDFItem($data) {
- if(is_array($data['children'])) {
- foreach($data['children'] as $child) {
- if(is_array($child)) {
- switch($child['tag']) {
- case "RSS:TITLE":
- case "RDF2:TITLE":
- $item['title'] = $child['children'][0];
- break;
- case "RSS:LINK":
- case "RDF2:LINK":
- $item['link'] = $child['children'][0];
- break;
- case "RSS:DESCRIPTION":
- case "RDF2:DESCRIPTION":
- $item["description"] = $child['children'][0];
- break;
- case "DC:DATE":
- $item["date"] = $this->dcDateToUnixTime($child['children'][0],0);
- $item["locdate"] = $this->dcDateToUnixTime($child['children'][0],1);
- break;
- default:
- break;
- }
- }
- }
- }
-
- return $item;
- }
-
- function getRSSItem($data) {
- if(is_array($data['children'])) {
- foreach($data['children'] as $child) {
- if(is_array($child)) {
- switch($child['tag']) {
- case "UNDEF:TITLE":
- case "RSS:TITLE":
- case "RSS2:TITLE":
- $item['title'] = $child['children'][0];
- break;
- case "UNDEF:LINK":
- case "RSS:LINK":
- case "RSS2:LINK":
- $item['link'] = $child['children'][0];
- break;
- case "UNDEF:DESCRIPTION":
- case "RSS:DESCRIPTION":
- case "RSS2:DESCRIPTION":
- $item["description"] = $child['children'][0];
- break;
- case "DC:DATE":
- $item["date"] = $this->dcDateToUnixTime($child['children'][0],0);
- $item["locdate"] = $this->dcDateToUnixTime($child['children'][0],1);
- break;
- case "UNDEF:PUBDATE":
- case "RSS:PUBDATE":
- case "RSS2:PUBDATE":
- $item["date"] = strtotime($child['children'][0]);
- $item["locdate"] = strtotime($child['children'][0]);
- break;
- default:
- break;
- }
- }
- }
- }
-
- return $item;
- }
-
- function dcDateToUnixTime($dcdate,$cvttz = 1) {
- list($date,$time) = explode("T",$dcdate);
- preg_match(
- "/([0-9]{2}:[0-9]{2}:[0-9]{2})(\-?\+?)([0-9]{2}):([0-9]{2})/",
- $time,
- $yo
- );
-
- if ($cvttz == 1) {
- return strtotime($date . " " . $yo[1] . $yo[2] . $yo[3] . $yo[4]);
- } else {
- return strtotime($date . " " . $yo[1]);
- }
-
- }
-}
-
-?>
Deleted: web/htdocs/footer.php
===================================================================
--- web/htdocs/footer.php 2010-12-06 14:23:15 UTC (rev 536)
+++ web/htdocs/footer.php 2010-12-06 14:25:00 UTC (rev 537)
@@ -1,31 +0,0 @@
-
-<hr>
-
-<p>
- <a
- href="http://sourceforge.net/donate/index.php?group_id=108380"><img
- src="http://sourceforge.net/images/project-support.jpg" width="88"
- height="32" alt="Please Support PEL"></a>
-
- <a href="http://sourceforge.net/projects/pel/"><img
- src="http://sourceforge.net/sflogo.php?group_id=108380&type=1"
- width="88" height="31" alt="SourceForge.net Logo"></a>
-
- <a href="http://validator.w3.org/check?uri=referer"><img
- src="http://www.w3.org/Icons/valid-html401" width="88" height="31"
- alt="Valid HTML 4.01!"></a>
-
- <a href="http://jigsaw.w3.org/css-validator/check/referer"><img
- src="http://www.w3.org/Icons/valid-css" width="88" height="31"
- alt="Valid CSS!"></a>
-</p>
-
-<?php
-/* The constant SVN should be set in the page that includes the
- * footer. */
-if (defined('SVN')) {
- $info = explode(' ', SVN);
- printf('<p id="svn-info">Revision %d of %s made on %s by %s.</p>',
- $info[2], $info[1], $info[3] . ' ' . $info[4], $info[5]);
-}
-?>
Deleted: web/htdocs/links.php
===================================================================
--- web/htdocs/links.php 2010-12-06 14:23:15 UTC (rev 536)
+++ web/htdocs/links.php 2010-12-06 14:25:00 UTC (rev 537)
@@ -1,141 +0,0 @@
-<?php // -*- coding: utf-8 -*-
-
-error_reporting (E_ALL);
-
-$mod = getlastmod();
-
-if (isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) &&
- strtotime($_SERVER['HTTP_IF_MODIFIED_SINCE']) == $mod) {
- header('HTTP/1.1 304 Not Modified');
- exit;
-}
-
-header('Last-Modified: ' . gmdate('r', $mod));
-
-header('Content-Type: text/html; charset=UTF-8');
-?>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
- "http://www.w3.org/TR/html4/strict.dtd">
-<html>
-<head>
- <link type="text/css" rel="stylesheet" href="pel.css">
- <title>PEL: PHP Exif Library — Links</title>
-</head>
-<body>
-<h1>PEL: PHP Exif Library — Links</h1>
-
-<!-- Page generated on <?php echo date('r') ?>. -->
-
-<?php include('navbar.php'); ?>
-
-<p>Below you will find various resources related to Exif in general
-and PEL in particular.</p>
-
-<h2><a id="r"></a>Resources</h2>
-
-<ul>
- <li>
- <p>The <a href="http://sourceforge.net/projects/pel/">SourceForge
- Project Page</a>.</p>
- </li>
-
- <li>
- <p>Online <a href="doc/">API Documentation</a> for the latest
- released version of PEL.</p>
- </li>
-
- <li>
- <p>The <a href="http://pel.svn.sourceforge.net/viewvc/pel/trunk/">SVN
- repository</a> where the newest developments can be found.</p>
- </li>
-
- <li>
- <p>PEAR channel at <tt>pear.sharedlog.com</tt>, maintained by Dmitri.</p>
- </li>
-
- <li>
- <p>The Exif specification from <a
- href="http://exif.org/">EXIF.org</a>.</p>
- </li>
-
- <li>
- <p>The <a
- href="http://park2.wakwak.com/~tsuruzoh/Computer/Digicams/exif-e.html">description
- of the Exif file format</a> by TsuruZoh Tachibanay.</p>
- </li>
-</ul>
-
-
-<h2 id="m">Mailinglists and Newsgroups</h2>
-
-<ul>
-
- <li>
- <p><b>PEL Development List</b></p>
-
- <p>This list is for general discussion on the development of PEL
- and for user questions. Please send your questions to this list
- and not directly to the developers.</p>
-
- <p>Mail: <a
- href="https://lists.sourceforge.net/mailman/listinfo/pel-devel">subscribe
- / unsubscribe</a>, <a
- href="https://sourceforge.net/mailarchive/forum.php?forum_id=40663">SourceForge
- archive</a>.<br />News: <a
- href="http://dir.gmane.org/gmane.comp.web.pel.devel">Gmane
- archive</a>.</p>
-
- </li>
-
- <li>
- <p><b>PEL Commits List</b></p>
-
- <p>This list is a read-only list. Every change the PEL repository
- triggers a mail to it, so subscribe if you want to follow the
- development closely.</p>
-
- <p>Mail: <a
- href="https://lists.sourceforge.net/mailman/listinfo/pel-commits">subscribe
- / unsubscribe</a>, <a
- href="https://sourceforge.net/mailarchive/forum.php?forum_id=40922">SourceForge
- archive</a>.<br />News: <a
- href="http://dir.gmane.org/gmane.comp.web.pel.cvs">Gmane
- archive</a>.</p>
- </li>
-
-</ul>
-
-
-<h2 id="s">Sites and Projects Using PEL</h2>
-
-<ul>
-
- <li>
- <p><a href="http://www.lessequal.com/visuals/">bobef
- / be less equal</a>.</p>
- </li>
-
- <li>
- <p><a href="http://drupal.org/project/exif">Drupal Exif
- Module</a>.</p>
- </li>
-
- <li>
- <p><a href="http://www.sharedlog.com/">SHAREDLOG.COM</a>.</p>
- </li>
-
- <li>
- <p><b>Your site?</b> Please send a mail to the <a
- href="mailto:pel...@li...">PEL development
- list</a> if you are using PEL!</p>
- </li>
-
-</ul>
-
-<?php
-define('SVN', '$Id$');
-include('footer.php');
-?>
-
-</body>
-</html>
Deleted: web/htdocs/navbar.php
===================================================================
--- web/htdocs/navbar.php 2010-12-06 14:23:15 UTC (rev 536)
+++ web/htdocs/navbar.php 2010-12-06 14:25:00 UTC (rev 537)
@@ -1,18 +0,0 @@
-
-<ul class="navbar">
- <li><b><a href="http://sourceforge.net/project/showfiles.php?group_id=108380">Download PEL</a></b></li>
-
- <li><a href="/doc/">API</a></li>
-
- <li><a href="#f">Features</a></li>
-
- <li><a href="#n">News</a></li>
-
- <li><a href="links.php">Links</a></li>
-
- <li><a href="#c">Credits</a></li>
-
- <li><a href="#s">Support PEL</a></li>
-
-</ul>
-
Deleted: web/htdocs/pel.css
===================================================================
--- web/htdocs/pel.css 2010-12-06 14:23:15 UTC (rev 536)
+++ web/htdocs/pel.css 2010-12-06 14:25:00 UTC (rev 537)
@@ -1,73 +0,0 @@
-body {
- font-family: sans-serif;
-}
-
-h1 {
- border-bottom: 3px solid navy;
- margin-bottom: 0.1em;
-}
-
-
-h2 {
- border-bottom: 3px solid navy;
-}
-
-h3 {
- margin-bottom: 0.5em;
- border-bottom: 1px solid blue;
-}
-
-h4 {
- margin-top: 0.5em;
- margin-bottom: 1.5em;
- font-size: small;
-}
-
-p {
- margin-top: 0.5em;
- margin-bottom: 0.5em;
-}
-
-
-ul.navbar {
- margin: 0;
-
- padding-left: 0;
- padding-right: 0;
-
- border-top: 1px solid blue;
- padding-top: 5px;
-
- border-bottom: 3px solid navy;
- padding-bottom: 5px;
-}
-
-ul.navbar li {
- display: inline;
- padding-left: 0;
- padding-right: 1.5em;
- margin: 0px;
-}
-
-ul.navbar a {
- text-decoration: none;
- padding: 4px;
-}
-
-ul.navbar a:hover {
- color:red;
- background-color: silver;
-}
-
-img {
- border: 0px;
-}
-
-hr {
- border: 1px solid navy;
-}
-
-#svn-info {
- font-size: smaller;
- color: gray;
-}
Deleted: web/xmlParser.php
===================================================================
--- web/xmlParser.php 2010-12-06 14:23:15 UTC (rev 536)
+++ web/xmlParser.php 2010-12-06 14:25:00 UTC (rev 537)
@@ -1,166 +0,0 @@
-<?
-/*
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-/*
- * Written by Reverend Jim (ji...@re...)
- *
- * http://revjim.net/code/xmlParser/
- */
-
-class XMLParser {
- var $ns2uri = array();
- var $uri2ns = array();
- var $unkcnt = 0;
- var $data; // Holds the XML structure
- var $xmldata; // Holds XML data
- var $version = "0.3";
-
-
- function defineNs($ident, $uri = "") {
- if ($uri == "") {
- $uri = "::UNDEFINED::";
- }
- $this->ns2uri[strtoupper($ident)] = $uri;
- $this->uri2ns[$uri] = strtoupper($ident);
- }
-
- function _getXmlChildren(&$vals, $ns, &$i) {
- $children = array();
-
- if (!empty($vals[$i]['value'])) {
- array_push($children, $vals[$i]['value']);
- }
-
- while (++$i < count($vals)) {
- if (!isset($vals[$i]['attributes']))
- $vals[$i]['attributes'] = '';
-
- switch ($vals[$i]['type']) {
- case 'cdata':
- array_push($children, $vals[$i]['value']);
- break;
-
- case 'complete':
- $tmpns = $this->getnamespaces($vals[$i]['attributes'],$ns);
- $tag = $this->_convertTagNs($vals[$i]['tag'],$tmpns);
- if($vals[$i]['value']) {
- array_push($children, array(
- 'tag' => $tag,
- 'attributes' => $vals[$i]['attributes'],
- 'children' => array($vals[$i]['value'])
- ));
- } else {
- array_push($children, array(
- 'tag' => $tag,
- 'attributes' => $vals[$i]['attributes']
- ));
- }
-
- break;
-
- case 'open':
- $tmpns = $this->getnamespaces($vals[$i]['attributes'],$ns);
- $tag = $this->_convertTagNs($vals[$i]['tag'],$tmpns);
- array_push($children, array(
- 'tag' => $tag,
- 'attributes' => $vals[$i]['attributes'],
- 'children' => $this->_getXmlChildren($vals,$tmpns,$i)
- ));
- break;
-
- case 'close':
- if (!empty($vals[$i]['value'])) {
- array_push($children, $vals[$i]['value']);
- }
- return $children;
- }
- }
- }
-
- function _convertTagNs($tag,$ns) {
- if($pos = strpos($tag,':')) {
- $docns = substr($tag,0,$pos);
- $doctag = substr($tag,$pos+1);
- } else {
- $docns = "::ROOT";
- $doctag = "$tag";
- }
-
- if (!empty($ns[$docns])) {
- $uri = $ns[$docns];
- } else {
- $uri = "::UNDEFINED::";
- }
-
- if($this->uri2ns[$uri]) {
- $parns = $this->uri2ns[$uri];
- } else {
- $this->definens("::UNK" . $this->unkcnt, $uri);
- $parns = "::UNK" . $this->unkcnt;
- $this->unkcnt++;
- }
-
- return $parns . ":" . $doctag;
-
- }
-
- function getXmlTree() {
- return $this->data;
- }
-
- function setXmlData($data) {
- $this->xmldata = $data;
- }
-
- function buildXmlTree() {
- $p = xml_parser_create();
- xml_parser_set_option($p, XML_OPTION_SKIP_WHITE, 1);
- xml_parse_into_struct($p, $this->xmldata, &$vals, &$index);
- xml_parser_free($p);
-
- $this->data = array();
- $i = 0;
- $ns = $this->getnamespaces($vals[$i]['attributes']);
- array_push($this->data, array(
- 'tag' => $this->_convertTagNs($vals[$i]['tag'],$ns),
- 'attributes' => $vals[$i]['attributes'],
- 'children' => $this->_getXmlChildren($vals, $ns, $i)
- ));
- }
-
- function getnamespaces($attribs,$ns = array()) {
- if (is_array($attribs)) {
- foreach($attribs as $key => $value) {
- $key = strtoupper($key);
- if (substr($key,0,5) == 'XMLNS') {
- if($pos = strpos($key,':')) {
- $ns[substr($key,$pos+1)] = $value;
- } else {
- $ns['::ROOT']= $value;
- }
- }
- }
- }
-
-
- return $ns;
- }
-
-
-}
-
-?>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <lso...@us...> - 2010-12-06 14:23:21
|
Revision: 536
http://pel.svn.sourceforge.net/pel/?rev=536&view=rev
Author: lsolesen
Date: 2010-12-06 14:23:15 +0000 (Mon, 06 Dec 2010)
Log Message:
-----------
pel.sourceforge.net has been closed and moved
Modified Paths:
--------------
web/htdocs/index.php
Modified: web/htdocs/index.php
===================================================================
--- web/htdocs/index.php 2010-07-21 15:12:35 UTC (rev 535)
+++ web/htdocs/index.php 2010-12-06 14:23:15 UTC (rev 536)
@@ -1,222 +1,17 @@
-<?php // -*- mode: nxml; coding: utf-8 -*-
-
-error_reporting (E_ALL);
-
-if (is_writable('/tmp/persistent/pel/projnews.xml')) {
- /* On SourceForge: */
- define('CACHE_FILE', '/tmp/persistent/pel/projnews.xml');
-} else {
- /* Elsewhere: */
- define('CACHE_FILE', '/tmp/pel-projnews.xml');
-}
-define('CACHE_TIMEOUT', 3*3600);
-
-$mod = max(filemtime(CACHE_FILE), getlastmod());
-$age = time() - $mod;
-$fresh = $age < CACHE_TIMEOUT;
-
-if (!isset($_GET['reload']) &&
- isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) &&
- strtotime($_SERVER['HTTP_IF_MODIFIED_SINCE']) == $mod) {
- header('HTTP/1.1 304 Not Modified');
- exit;
-}
-
-header('Expires: ' . gmdate('r', $mod + CACHE_TIMEOUT));
-header('Cache-Control: max-age=' . (CACHE_TIMEOUT - $age));
-header('Last-Modified: ' . gmdate('r', $mod));
-
-header('Content-Type: text/html; charset=UTF-8');
+<?php
+header("HTTP/1.1 301 Moved Permanently");
+header("Location: http://github.com/lsolesen/pel/");
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
- <link type="text/css" rel="stylesheet" href="pel.css">
<title>PEL: PHP Exif Library</title>
</head>
<body>
-<h1>PEL: PHP Exif Library</h1>
+<h1>PEL: PHP Exif Library has moved</h1>
-<!-- Page generated on <?php echo date('r') ?>. -->
+<p>PEL has moved to <a href="http://github.com/lsolesen/pel">github.com/lsolesen/pel</a>. Please update your bookmarks.</p>
-<?php include('navbar.php'); ?>
-
-<p>The PHP Exif Library (PEL) lets you fully manipulate Exif
-(Exchangeable Image File Format) data. This is the data that digital
-cameras place in their images, such as the date and time, shutter
-speed, ISO value and so on.</p>
-
-<p>Using PEL, one can fully modify the Exif data, meaning that it can
-be both <strong>read</strong> and <strong>written</strong>. Completely
-new Exif data can also be added to images. PEL is written completely
-in PHP and depends on nothing except a standard installation of PHP,
-<a href="http://www.php.net/downloads.php#v5">version 5</a>. PEL
-is hosted on <a
-href="http://sourceforge.net/projects/pel/">SourceForge</a>.</p>
-
-<h2 id="f">Features</h2>
-
-<ul>
- <li>
- Reads and parses both JPEG and TIFF images.
- </li>
-
- <li>
- All Exif tags can be modified: new tags can be created and old
- tags can be updated.
- </li>
-
- <li>
- Extensible object-oriented design. PEL utilizes the new
- features in PHP 5.
- </li>
-
- <li>
- Tested with <a
- href="http://sourceforge.net/projects/simpletest">SimpleTest</a>
- (11 camera models tested, plus core tests).
- </li>
-
- <li>
- Fully documented with <a
- href="http://phpdoc.org/">PhpDocumentor</a>, see the online <a
- href="doc/">API documentation</a>.
- </li>
-
- <li>
- Supports internationalisation.
- </li>
-
-</ul>
-
-<h2 id="i">Installation</h2>
-
-<p>
-You can install PEL as a pear package using the following code:
-</p>
-
-<code>
- pear channel-discover pearhub.org<br>
- pear install pearhub/PEL
-</code>
-
-<h2 id="n">News</h2>
-
-<p>Below you will find the latest news about PEL, go to the <a
-href="http://sourceforge.net/news/?group_id=108380">News Archive</a>
-for older news posts.</p>
-
-<?php
-
-if (!$fresh || isset($HTTP_GET_VARS['reload'])) {
-
- echo "<!-- Fetching RSS feed from SourceForge. -->\n";
-
- $url = 'http://sourceforge.net/export/rss2_projnews.php?' .
- 'group_id=108380&rss_fulltext=1';
-
- $tmp = tempnam('/tmp', 'pel');
- $out = fopen($tmp, 'w');
- $in = fopen($url, 'r');
-
- while (!feof($in)) {
- fwrite($out, fread($in, 4096));
- }
-
- fclose($out);
- fclose($in);
-
- /* Rename doesn't work across devices PHP prior to version 4.3.3. */
- copy($tmp, CACHE_FILE);
- //chmod(CACHE_FILE, 0644);
- unlink($tmp);
-}
-
-require_once('../xmlParser.php');
-require_once('../feedParser.php');
-
-$data = implode('', file(CACHE_FILE));
-$p = new feedParser();
-$info = $p->parseFeed($data);
-
-foreach (array_slice($info['item'], 0, 4) as $item) {
- echo '<h3>' . $item['title'] . "</h3>\n";
- echo '<h4>' . date('F jS, Y', $item['date']) . "</h4>\n";
-
- $lines = explode('<br /><br />', $item['description']);
- $last = array_pop($lines);
- $last = str_replace(' (<a href="http://sourceforge.net/forum/forum.php',
- '<br>(<a href="http://sourceforge.net/forum/forum.php',
- $last);
- array_push($lines, $last);
-
- foreach ($lines as $line) {
-
- /* Fixup the URLs SourceForge generate... */
- echo '<p>' . wordwrap(str_replace(array('<br />',
- '---',
- '>http://downloads.sf.net/pel/'),
- array("<br>\n",
- '—',
- '>'),
- $line)) . "</p>\n";
- }
-
- echo "\n";
-}
-
-
-?>
-
-
-<h2 id="c">Credits</h2>
-
-<p>PEL is written by <a href="mailto:mge...@us...">Martin Geisler</a>.</p>
-
-<p>The source started out as a port of the nice, clean C code found in
-<a href="http://sourceforge.net/projects/libexif/">libexif</a>. This
-means that PEL share the basic design ideas and features with the
-library. But PEL does not depend on libexif to be installed, or
-available in any way — PEL is independent PHP code.</p>
-
-<p>The German, French, and Spanish translations are also taken from
-the libexif project.</p>
-
-<h3>Test Image Contributors</h3>
-
-<p>Lars Geisler: Nikon Coolscan IV ED test image.</p>
-
-<p><a href="http://folly.dk/">Stéphanie Bittel</a>: Canon IXUS II test image.</p>
-
-<p>Bernhard Bittel: Nikon E950 and E5000 test images.</p>
-
-<p><a href="http://ubehageligt.dk/">Mikkel Krøigård</a>: Canon PowerShot S60 test image.</p>
-
-<p>Thomas B. Pedersen: Olympus C-50z and C-765z test images.</p>
-
-<p>Lisbeth Nygaard Pedersen: Leica D-LUX test image.</p>
-
-<p>Paul Mitchum: Pentax *ist DS and Olympus C-5050z test images.</p>
-
-
-<h2 id="s">Support PEL</h2>
-
-<p>If you have tried PEL, and like the functionality it provides, then
-please supporting the development by donating money. This can be done
-through PayPal — please visit the <a
-href="http://sourceforge.net/donate/index.php?group_id=108380">SourceForge
-donation page</a> for more information. Any donation will be gladly
-accepted, thank you!</p>
-
-<p>Another way to show that you liked PEL is to take a moment and rate
-it at the <a href="http://freshmeat.net/projects/pel/">freshmeat.net
-project page</a>.</p>
-
-<?php
-define('SVN', '$Id$');
-include('footer.php');
-?>
-
</body>
</html>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <lso...@us...> - 2010-07-21 15:12:41
|
Revision: 535
http://pel.svn.sourceforge.net/pel/?rev=535&view=rev
Author: lsolesen
Date: 2010-07-21 15:12:35 +0000 (Wed, 21 Jul 2010)
Log Message:
-----------
Added README file in markdown format.
Added Paths:
-----------
trunk/README.markdown
Added: trunk/README.markdown
===================================================================
--- trunk/README.markdown (rev 0)
+++ trunk/README.markdown 2010-07-21 15:12:35 UTC (rev 535)
@@ -0,0 +1,120 @@
+PEL: PHP Exit Library
+==
+
+PHP Exif Library. A library with support for
+reading and writing Exif headers in JPEG and TIFF images using PHP.
+
+Description
+--
+
+The PHP Exif Library (PEL) makes it easy to develop programs that will
+read and write the Exif metadata headers found in JPEG and TIFF
+images. See the file INSTALL for an introduction to how PEL can be
+used by your application.
+
+PEL is a library written entirely in PHP 5, which means that it does
+not have any dependencies outside the core of PHP, it does not even
+use the Exif module available for PHP.
+
+Please note that the API for PEL is not yet frozen, and it will remain
+changeable until version 1.0 is reached. Read the NEWS file for
+important information about API changes.
+
+Also, please go to the PEL development mailing list (look below) and
+share your ideas about how the API should look like.
+
+
+Documentation Overview
+--
+
+* README: gives you a short introduction to PEL (this file).
+
+* INSTALL: explain how to install and get going with PEL.
+
+* NEWS: contains important information about changes in PEL.
+
+* examples/: small self-contained examples of how to use PEL.
+
+* doc/: the API documentation with a short tutorial and more examples.
+
+* AUTHORS: list of people who have helped.
+
+
+Features of PEL
+--
+
+* Reads and writes Exif metadata from both JPEG and TIFF images.
+
+* Supports reading and writing all Exif tags.
+
+* Supports internationalization.
+
+* Extensible object-oriented design.
+
+* Unit-tested with SimpleTest (http://sf.net/projects/simpletest).
+
+* Documented with PhpDocumentor (http://phpdoc.org/).
+
+
+Getting Support
+--
+
+The first place you should consult for support is the documentation
+supplied with PEL, found in the doc/ directory. There you will find a
+complete API documentation with descriptions of all classes and files
+in PEL.
+
+The scripts found in the examples/ directory are also a good source of
+information, especially the edit-description.php file which has tons
+of comments.
+
+PEL is hosted on SourceForge and uses the tools found there for
+support. This means that all questions, bug reports, etc. should be
+directed there (and not directly to Martin Geisler).
+
+The preferred way of getting support is the development mailing list:
+
+ http://lists.sourceforge.net/lists/listinfo/pel-devel
+
+After you have subscribed (do not worry, it is a low volume list) you
+can post by sending your question to
+
+ <pel...@li...>
+
+If you have a specific support request, a bug report, a feature
+request, or maybe a patch, please use the corresponding tracker:
+
+ http://sourceforge.net/tracker/?group_id=108380
+
+Please try the latest version before reporting bugs --- it might have
+been fixed already. The latest code can be found in the Subversion
+repository, please see this SourceForge page for more information:
+
+ http://sourceforge.net/svn/?group_id=108380
+
+It is very helpful if you try out the latest code from the Subversion
+repository before submitting a bug report. The code found there is
+generally very stable.
+
+
+Contributing Test Images
+--
+
+To make PEL as stable as possible, it is tested with images from a
+number of different camera models. Those test images have been split
+out into a separate download, to make the core PEL as small and quick
+as possible to download. Download the test images from the PEL
+homepage:
+
+ http://pel.sourceforge.net/
+
+New test images are very much appreciated --- please download the
+existing test images and read the README file found there for
+instructions.
+
+
+Credits
+--
+
+Please see the AUTHORS file for a list of people who have contributed
+to PEL.
Property changes on: trunk/README.markdown
___________________________________________________________________
Added: svn:executable
+ *
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <lso...@us...> - 2010-06-06 22:45:34
|
Revision: 534
http://pel.svn.sourceforge.net/pel/?rev=534&view=rev
Author: lsolesen
Date: 2010-06-06 22:45:28 +0000 (Sun, 06 Jun 2010)
Log Message:
-----------
Not reporting E_DEPRECATED.
Modified Paths:
--------------
trunk/test/run-tests.php
Modified: trunk/test/run-tests.php
===================================================================
--- trunk/test/run-tests.php 2010-03-08 09:48:27 UTC (rev 533)
+++ trunk/test/run-tests.php 2010-06-06 22:45:28 UTC (rev 534)
@@ -24,7 +24,7 @@
/* $Id$ */
-error_reporting(E_ALL);
+error_reporting(E_ALL &~E_DEPRECATED);
if (!file_exists(dirname(__FILE__) . '/config.local.php')) {
echo "Create config.local.php";
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <lso...@us...> - 2010-03-08 09:48:42
|
Revision: 533
http://pel.svn.sourceforge.net/pel/?rev=533&view=rev
Author: lsolesen
Date: 2010-03-08 09:48:27 +0000 (Mon, 08 Mar 2010)
Log Message:
-----------
Property Changed:
----------------
/
Property changes on:
___________________________________________________________________
Added: svn:ignore
+ .buildpath
.project
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <lso...@us...> - 2010-02-24 10:30:37
|
Revision: 532
http://pel.svn.sourceforge.net/pel/?rev=532&view=rev
Author: lsolesen
Date: 2010-02-24 10:30:24 +0000 (Wed, 24 Feb 2010)
Log Message:
-----------
Added config.local.php and config.local.example.php to ignored tests.
Modified Paths:
--------------
trunk/test/run-tests.php
Modified: trunk/test/run-tests.php
===================================================================
--- trunk/test/run-tests.php 2010-02-24 10:29:57 UTC (rev 531)
+++ trunk/test/run-tests.php 2010-02-24 10:30:24 UTC (rev 532)
@@ -26,7 +26,7 @@
error_reporting(E_ALL);
-if (!file_exists(dirname(__FILE__))) {
+if (!file_exists(dirname(__FILE__) . '/config.local.php')) {
echo "Create config.local.php";
exit(1);
}
@@ -66,7 +66,7 @@
$group = new GroupTest('Selected PEL tests');
} else {
/* otherwive test all .php files, except this file (run-tests.php). */
- $tests = array_diff(glob('*.php'), array('run-tests.php'));
+ $tests = array_diff(glob('*.php'), array('run-tests.php', 'config.local.php', 'config.local.example.php'));
$group = new GroupTest('All PEL tests');
/* Also test all image tests (if they are available). */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <lso...@us...> - 2010-02-24 10:30:17
|
Revision: 531
http://pel.svn.sourceforge.net/pel/?rev=531&view=rev
Author: lsolesen
Date: 2010-02-24 10:29:57 +0000 (Wed, 24 Feb 2010)
Log Message:
-----------
Made sure that it does not throw an exception but fails because it does.
Modified Paths:
--------------
trunk/test/bug1730993.php
Modified: trunk/test/bug1730993.php
===================================================================
--- trunk/test/bug1730993.php 2010-02-24 10:14:14 UTC (rev 530)
+++ trunk/test/bug1730993.php 2010-02-24 10:29:57 UTC (rev 531)
@@ -31,14 +31,16 @@
$tmpfile = dirname(__FILE__) . '/images/bug1730993_tmp.jpg';
$bigfile = dirname(__FILE__) . '/images/bug1730993_large.jpg';
- $jpeg = new PelJpeg($tmpfile); // the error occurs here
- $exif = $jpeg->getExif();
- if ($exif != null) {
- $jpeg1 = new PelJpeg($bigfile);
- $jpeg1->setExif($exif);
- file_put_contents($bigfile, $jpeg1->getBytes());
+ try {
+ $jpeg = new PelJpeg($tmpfile); // the error occurs here
+ $exif = $jpeg->getExif();
+ if ($exif != null) {
+ $jpeg1 = new PelJpeg($bigfile);
+ $jpeg1->setExif($exif);
+ file_put_contents($bigfile, $jpeg1->getBytes());
+ }
+ } catch (Exception $e) {
+ $this->fail('Test should not throw an exception');
}
}
}
-
-?>
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <lso...@us...> - 2010-02-24 10:14:22
|
Revision: 530
http://pel.svn.sourceforge.net/pel/?rev=530&view=rev
Author: lsolesen
Date: 2010-02-24 10:14:14 +0000 (Wed, 24 Feb 2010)
Log Message:
-----------
Makes a test whether the config.local.php is present.
Modified Paths:
--------------
trunk/test/run-tests.php
Modified: trunk/test/run-tests.php
===================================================================
--- trunk/test/run-tests.php 2010-02-24 09:57:51 UTC (rev 529)
+++ trunk/test/run-tests.php 2010-02-24 10:14:14 UTC (rev 530)
@@ -26,6 +26,11 @@
error_reporting(E_ALL);
+if (!file_exists(dirname(__FILE__))) {
+ echo "Create config.local.php";
+ exit(1);
+}
+
require_once 'config.local.php';
if (!defined('SIMPLE_TEST')) {
@@ -54,7 +59,7 @@
require_once(SIMPLE_TEST . 'unit_tester.php');
require_once(SIMPLE_TEST . 'reporter.php');
-if ($argc > 1) {
+if (!empty($argc) AND $argc > 1) {
/* If command line arguments are given, then only test those. */
array_shift($argv);
$tests = $argv;
@@ -84,5 +89,3 @@
$group->addTestFile($test);
$group->run(new TextReporter());
-
-?>
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <lso...@us...> - 2010-02-24 09:57:57
|
Revision: 529
http://pel.svn.sourceforge.net/pel/?rev=529&view=rev
Author: lsolesen
Date: 2010-02-24 09:57:51 +0000 (Wed, 24 Feb 2010)
Log Message:
-----------
Added information about how to install PEL.
Modified Paths:
--------------
web/htdocs/index.php
Modified: web/htdocs/index.php
===================================================================
--- web/htdocs/index.php 2010-02-24 09:52:37 UTC (rev 528)
+++ web/htdocs/index.php 2010-02-24 09:57:51 UTC (rev 529)
@@ -90,7 +90,17 @@
</ul>
+<h2 id="i">Installation</h2>
+<p>
+You can install PEL as a pear package using the following code:
+</p>
+
+<code>
+ pear channel-discover pearhub.org<br>
+ pear install pearhub/PEL
+</code>
+
<h2 id="n">News</h2>
<p>Below you will find the latest news about PEL, go to the <a
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <lso...@us...> - 2010-02-24 09:52:43
|
Revision: 528
http://pel.svn.sourceforge.net/pel/?rev=528&view=rev
Author: lsolesen
Date: 2010-02-24 09:52:37 +0000 (Wed, 24 Feb 2010)
Log Message:
-----------
Property Changed:
----------------
trunk/test/
Property changes on: trunk/test
___________________________________________________________________
Added: svn:ignore
+ config.local.php
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <lso...@us...> - 2010-02-24 09:46:39
|
Revision: 527
http://pel.svn.sourceforge.net/pel/?rev=527&view=rev
Author: lsolesen
Date: 2010-02-24 09:46:33 +0000 (Wed, 24 Feb 2010)
Log Message:
-----------
A maintenance tag to make automatic releases on pearhub.org.
Added Paths:
-----------
tags/0.9.2/
tags/0.9.2/test/config.local.example.php
tags/0.9.2/test/run-tests.php
Removed Paths:
-------------
tags/0.9.2/test/run-tests.php
Property Changed:
----------------
tags/0.9.2/test/
Property changes on: tags/0.9.2/test
___________________________________________________________________
Added: svn:ignore
+ config.local.php
Copied: tags/0.9.2/test/config.local.example.php (from rev 526, trunk/test/config.local.example.php)
===================================================================
--- tags/0.9.2/test/config.local.example.php (rev 0)
+++ tags/0.9.2/test/config.local.example.php 2010-02-24 09:46:33 UTC (rev 527)
@@ -0,0 +1,4 @@
+<?php
+/* You can define the path to SimpleTest here, or you can let PEL
+ * search for it by walking up the directory tree. */
+define('SIMPLE_TEST', '/usr/share/php/');
\ No newline at end of file
Deleted: tags/0.9.2/test/run-tests.php
===================================================================
--- trunk/test/run-tests.php 2009-03-01 20:32:45 UTC (rev 523)
+++ tags/0.9.2/test/run-tests.php 2010-02-24 09:46:33 UTC (rev 527)
@@ -1,90 +0,0 @@
-#!/usr/bin/php
-<?php
-
-/* PEL: PHP Exif Library. A library with support for reading and
- * writing all Exif headers in JPEG and TIFF images using PHP.
- *
- * Copyright (C) 2004, 2005, 2006 Martin Geisler.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program in the file COPYING; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
- * Boston, MA 02110-1301 USA
- */
-
-/* $Id$ */
-
-error_reporting(E_ALL);
-
-/* You can define the path to SimpleTest here, or you can let PEL
- * search for it by walking up the directory tree. */
-//define('SIMPLE_TEST', '../simpletest/');
-
-if (!defined('SIMPLE_TEST')) {
- /* Search for a directory named 'simpletest' upwards in the
- * directory tree. */
- $dir = 'simpletest/';
- while (!is_file($dir . 'unit_tester.php')) {
- print "Looking for SimpleTest in $dir...\n";
- $dir = '../' . $dir;
- }
-
- define('SIMPLE_TEST', $dir);
-}
-
-if (is_dir(SIMPLE_TEST)) {
- printf("Found SimpleTest version %s in %s!\n",
- file_get_contents(SIMPLE_TEST . 'VERSION'),
- SIMPLE_TEST);
-} else {
- print "SimpleTest could not be found and so no tests can be made.\n";
- print "Please download SimpleTest from http://simpletest.sf.net/\n";
- print "and unpack it in as one of the directories mentioned above.\n";
- exit(1);
-}
-
-require_once(SIMPLE_TEST . 'unit_tester.php');
-require_once(SIMPLE_TEST . 'reporter.php');
-
-if ($argc > 1) {
- /* If command line arguments are given, then only test those. */
- array_shift($argv);
- $tests = $argv;
- $group = new GroupTest('Selected PEL tests');
-} else {
- /* otherwive test all .php files, except this file (run-tests.php). */
- $tests = array_diff(glob('*.php'), array('run-tests.php'));
- $group = new GroupTest('All PEL tests');
-
- /* Also test all image tests (if they are available). */
- if (is_dir('image-tests')) {
- $image_tests = array_diff(glob('image-tests/*.php'),
- array('image-tests/make-image-test.php'));
- $image_group = new GroupTest('Image Tests');
- foreach ($image_tests as $image_test)
- $image_group->addTestFile($image_test);
-
- $group->addTestCase($image_group);
- } else {
- echo "Found no image tests, only core functionality will be tested.\n";
- echo "Image tests are available from http://pel.sourceforge.net/.\n";
- }
-
-}
-
-foreach ($tests as $test)
- $group->addTestFile($test);
-
-$group->run(new TextReporter());
-
-?>
\ No newline at end of file
Copied: tags/0.9.2/test/run-tests.php (from rev 526, trunk/test/run-tests.php)
===================================================================
--- tags/0.9.2/test/run-tests.php (rev 0)
+++ tags/0.9.2/test/run-tests.php 2010-02-24 09:46:33 UTC (rev 527)
@@ -0,0 +1,88 @@
+#!/usr/bin/php
+<?php
+
+/* PEL: PHP Exif Library. A library with support for reading and
+ * writing all Exif headers in JPEG and TIFF images using PHP.
+ *
+ * Copyright (C) 2004, 2005, 2006 Martin Geisler.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program in the file COPYING; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301 USA
+ */
+
+/* $Id$ */
+
+error_reporting(E_ALL);
+
+require_once 'config.local.php';
+
+if (!defined('SIMPLE_TEST')) {
+ /* Search for a directory named 'simpletest' upwards in the
+ * directory tree. */
+ $dir = 'simpletest/';
+ while (!is_file($dir . 'unit_tester.php')) {
+ print "Looking for SimpleTest in $dir...\n";
+ $dir = '../' . $dir;
+ }
+
+ define('SIMPLE_TEST', $dir);
+}
+
+if (is_dir(SIMPLE_TEST)) {
+ printf("Found SimpleTest version %s in %s!\n",
+ file_get_contents(SIMPLE_TEST . 'VERSION'),
+ SIMPLE_TEST);
+} else {
+ print "SimpleTest could not be found and so no tests can be made.\n";
+ print "Please download SimpleTest from http://simpletest.sf.net/\n";
+ print "and unpack it in as one of the directories mentioned above.\n";
+ exit(1);
+}
+
+require_once(SIMPLE_TEST . 'unit_tester.php');
+require_once(SIMPLE_TEST . 'reporter.php');
+
+if ($argc > 1) {
+ /* If command line arguments are given, then only test those. */
+ array_shift($argv);
+ $tests = $argv;
+ $group = new GroupTest('Selected PEL tests');
+} else {
+ /* otherwive test all .php files, except this file (run-tests.php). */
+ $tests = array_diff(glob('*.php'), array('run-tests.php'));
+ $group = new GroupTest('All PEL tests');
+
+ /* Also test all image tests (if they are available). */
+ if (is_dir('image-tests')) {
+ $image_tests = array_diff(glob('image-tests/*.php'),
+ array('image-tests/make-image-test.php'));
+ $image_group = new GroupTest('Image Tests');
+ foreach ($image_tests as $image_test)
+ $image_group->addTestFile($image_test);
+
+ $group->addTestCase($image_group);
+ } else {
+ echo "Found no image tests, only core functionality will be tested.\n";
+ echo "Image tests are available from http://pel.sourceforge.net/.\n";
+ }
+
+}
+
+foreach ($tests as $test)
+ $group->addTestFile($test);
+
+$group->run(new TextReporter());
+
+?>
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <lso...@us...> - 2010-02-24 09:44:47
|
Revision: 526
http://pel.svn.sourceforge.net/pel/?rev=526&view=rev
Author: lsolesen
Date: 2010-02-24 09:44:40 +0000 (Wed, 24 Feb 2010)
Log Message:
-----------
Moved the possibility to edit settings in run-tests.php to config.local.php. An example has been provided.
Modified Paths:
--------------
trunk/test/run-tests.php
Added Paths:
-----------
trunk/test/config.local.example.php
Added: trunk/test/config.local.example.php
===================================================================
--- trunk/test/config.local.example.php (rev 0)
+++ trunk/test/config.local.example.php 2010-02-24 09:44:40 UTC (rev 526)
@@ -0,0 +1,4 @@
+<?php
+/* You can define the path to SimpleTest here, or you can let PEL
+ * search for it by walking up the directory tree. */
+define('SIMPLE_TEST', '/usr/share/php/');
\ No newline at end of file
Modified: trunk/test/run-tests.php
===================================================================
--- trunk/test/run-tests.php 2010-02-24 09:39:16 UTC (rev 525)
+++ trunk/test/run-tests.php 2010-02-24 09:44:40 UTC (rev 526)
@@ -26,9 +26,7 @@
error_reporting(E_ALL);
-/* You can define the path to SimpleTest here, or you can let PEL
- * search for it by walking up the directory tree. */
-//define('SIMPLE_TEST', '../simpletest/');
+require_once 'config.local.php';
if (!defined('SIMPLE_TEST')) {
/* Search for a directory named 'simpletest' upwards in the
@@ -56,7 +54,7 @@
require_once(SIMPLE_TEST . 'unit_tester.php');
require_once(SIMPLE_TEST . 'reporter.php');
-if ($argc > 1) {
+if ($argc > 1) {
/* If command line arguments are given, then only test those. */
array_shift($argv);
$tests = $argv;
@@ -73,7 +71,7 @@
$image_group = new GroupTest('Image Tests');
foreach ($image_tests as $image_test)
$image_group->addTestFile($image_test);
-
+
$group->addTestCase($image_group);
} else {
echo "Found no image tests, only core functionality will be tested.\n";
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <lso...@us...> - 2010-02-24 09:39:23
|
Revision: 525
http://pel.svn.sourceforge.net/pel/?rev=525&view=rev
Author: lsolesen
Date: 2010-02-24 09:39:16 +0000 (Wed, 24 Feb 2010)
Log Message:
-----------
Removed unneccesary links.
Modified Paths:
--------------
web/htdocs/navbar.php
Modified: web/htdocs/navbar.php
===================================================================
--- web/htdocs/navbar.php 2010-02-24 09:31:12 UTC (rev 524)
+++ web/htdocs/navbar.php 2010-02-24 09:39:16 UTC (rev 525)
@@ -4,15 +4,15 @@
<li><a href="/doc/">API</a></li>
- <li><a href="index.php#f">Features</a></li>
+ <li><a href="#f">Features</a></li>
- <li><a href="index.php#n">News</a></li>
+ <li><a href="#n">News</a></li>
<li><a href="links.php">Links</a></li>
- <li><a href="index.php#c">Credits</a></li>
+ <li><a href="#c">Credits</a></li>
- <li><a href="index.php#s">Support PEL</a></li>
+ <li><a href="#s">Support PEL</a></li>
</ul>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <lso...@us...> - 2010-02-24 09:31:21
|
Revision: 524
http://pel.svn.sourceforge.net/pel/?rev=524&view=rev
Author: lsolesen
Date: 2010-02-24 09:31:12 +0000 (Wed, 24 Feb 2010)
Log Message:
-----------
Removed unneccessary tags.
Modified Paths:
--------------
web/htdocs/index.php
Modified: web/htdocs/index.php
===================================================================
--- web/htdocs/index.php 2009-03-01 20:32:45 UTC (rev 523)
+++ web/htdocs/index.php 2010-02-24 09:31:12 UTC (rev 524)
@@ -55,41 +55,40 @@
is hosted on <a
href="http://sourceforge.net/projects/pel/">SourceForge</a>.</p>
-
<h2 id="f">Features</h2>
<ul>
<li>
- <p>Reads and parses both JPEG and TIFF images.</p>
+ Reads and parses both JPEG and TIFF images.
</li>
<li>
- <p>All Exif tags can be modified: new tags can be created and old
- tags can be updated.</p>
+ All Exif tags can be modified: new tags can be created and old
+ tags can be updated.
</li>
<li>
- <p>Extensible object-oriented design. PEL utilizes the new
- features in PHP 5.</p>
+ Extensible object-oriented design. PEL utilizes the new
+ features in PHP 5.
</li>
<li>
- <p>Tested with <a
+ Tested with <a
href="http://sourceforge.net/projects/simpletest">SimpleTest</a>
- (11 camera models tested, plus core tests).</p>
+ (11 camera models tested, plus core tests).
</li>
<li>
- <p>Fully documented with <a
+ Fully documented with <a
href="http://phpdoc.org/">PhpDocumentor</a>, see the online <a
- href="doc/">API documentation</a>.</p>
+ href="doc/">API documentation</a>.
</li>
<li>
- <p>Supports internationalisation.</p>
+ Supports internationalisation.
</li>
-</ul>
+</ul>
<h2 id="n">News</h2>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <lso...@us...> - 2009-03-01 21:01:13
|
Revision: 520
http://pel.svn.sourceforge.net/pel/?rev=520&view=rev
Author: lsolesen
Date: 2009-03-01 20:10:28 +0000 (Sun, 01 Mar 2009)
Log Message:
-----------
For the time being PelTag.php is ignored when doing code sniffing.
Modified Paths:
--------------
trunk/build.xml
Modified: trunk/build.xml
===================================================================
--- trunk/build.xml 2009-03-01 19:45:48 UTC (rev 519)
+++ trunk/build.xml 2009-03-01 20:10:28 UTC (rev 520)
@@ -105,7 +105,7 @@
<target name="phpcs">
<exec output="${reports.dir}/checkstyle.xml" dir="${source.dir}"
- command="phpcs --report=checkstyle ./src --standard=PEAR" />
+ command="phpcs --report=checkstyle ./src --ignore=./src/PelTag.php --standard=PEAR" />
</target>
<target name="php-documentor" depends="export">
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <lso...@us...> - 2009-03-01 20:32:52
|
Revision: 523
http://pel.svn.sourceforge.net/pel/?rev=523&view=rev
Author: lsolesen
Date: 2009-03-01 20:32:45 +0000 (Sun, 01 Mar 2009)
Log Message:
-----------
Only does the tests now in the build.
Modified Paths:
--------------
trunk/build.xml
Modified: trunk/build.xml
===================================================================
--- trunk/build.xml 2009-03-01 20:28:15 UTC (rev 522)
+++ trunk/build.xml 2009-03-01 20:32:45 UTC (rev 523)
@@ -82,7 +82,7 @@
</d51pearpkg2>
</target>
- <target name="build" depends="prepare, export, test, php-codesniffer, php-documentor, make-pear-package">
+ <target name="build" depends="prepare, export, test">
<!-- -->
</target>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <lso...@us...> - 2009-03-01 20:28:20
|
Revision: 522
http://pel.svn.sourceforge.net/pel/?rev=522&view=rev
Author: lsolesen
Date: 2009-03-01 20:28:15 +0000 (Sun, 01 Mar 2009)
Log Message:
-----------
Renamed phpcs target to php-codesniffer.
Modified Paths:
--------------
trunk/build.xml
Modified: trunk/build.xml
===================================================================
--- trunk/build.xml 2009-03-01 20:18:41 UTC (rev 521)
+++ trunk/build.xml 2009-03-01 20:28:15 UTC (rev 522)
@@ -82,7 +82,8 @@
</d51pearpkg2>
</target>
- <target name="build" depends="prepare, export, test, phpcs, php-documentor, make-pear-package">
+ <target name="build" depends="prepare, export, test, php-codesniffer, php-documentor, make-pear-package">
+ <!-- -->
</target>
<target name="make-pear-package" depends="pear">
@@ -103,7 +104,7 @@
</ftpdeploy>
</target>
- <target name="phpcs">
+ <target name="php-codesniffer">
<exec output="${reports.dir}/checkstyle.xml" dir="${source.dir}"
command="phpcs --report=checkstyle ./src --ignore=./src/PelTag.php --standard=PEAR" />
</target>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <lso...@us...> - 2009-03-01 20:18:47
|
Revision: 521
http://pel.svn.sourceforge.net/pel/?rev=521&view=rev
Author: lsolesen
Date: 2009-03-01 20:18:41 +0000 (Sun, 01 Mar 2009)
Log Message:
-----------
Added Lars Olesen as the maintainer.
Modified Paths:
--------------
trunk/AUTHORS
Modified: trunk/AUTHORS
===================================================================
--- trunk/AUTHORS 2009-03-01 20:10:28 UTC (rev 520)
+++ trunk/AUTHORS 2009-03-01 20:18:41 UTC (rev 521)
@@ -1,14 +1,16 @@
AUTHORS file for PEL: PHP Exif Library. A library with support for
reading and writing Exif headers in JPEG and TIFF images using PHP.
-Copyright (C) 2004, 2005, 2006 Martin Geisler.
+Copyright (C) 2004, 2005, 2006, 2007 Martin Geisler.
+Copyright (c) 2008, 2009 Lars Olesen
Licensed under the GNU GPL, see COPYING for details.
Credits
*******
-PEL is written by Martin Geisler <mge...@us...>.
+PEL is written by Martin Geisler <mge...@us...> and
+is now maintained by Lars Olesen <la...@le...>
The source started out as a port of the nice, clean C code found in
libexif. Most of the translations included with PEL also originates
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <lso...@us...> - 2009-03-01 19:45:58
|
Revision: 519
http://pel.svn.sourceforge.net/pel/?rev=519&view=rev
Author: lsolesen
Date: 2009-03-01 19:45:48 +0000 (Sun, 01 Mar 2009)
Log Message:
-----------
Tried a new phpcs target setup.
Modified Paths:
--------------
trunk/build.xml
Modified: trunk/build.xml
===================================================================
--- trunk/build.xml 2009-03-01 19:42:00 UTC (rev 518)
+++ trunk/build.xml 2009-03-01 19:45:48 UTC (rev 519)
@@ -104,8 +104,8 @@
</target>
<target name="phpcs">
- <exec output="${reports.dir}/checkstyle.xml" dir="${source.dir}/src/"
- command="phpcs --report=checkstyle . --standard=PEAR" />
+ <exec output="${reports.dir}/checkstyle.xml" dir="${source.dir}"
+ command="phpcs --report=checkstyle ./src --standard=PEAR" />
</target>
<target name="php-documentor" depends="export">
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <lso...@us...> - 2009-03-01 19:42:06
|
Revision: 518
http://pel.svn.sourceforge.net/pel/?rev=518&view=rev
Author: lsolesen
Date: 2009-03-01 19:42:00 +0000 (Sun, 01 Mar 2009)
Log Message:
-----------
Creates the logs dir.
Modified Paths:
--------------
trunk/build.xml
Modified: trunk/build.xml
===================================================================
--- trunk/build.xml 2009-03-01 18:41:55 UTC (rev 517)
+++ trunk/build.xml 2009-03-01 19:42:00 UTC (rev 518)
@@ -25,6 +25,7 @@
<target name="export">
<echo msg="Exporting SVN files" />
<exec command="svn export ${source.dir} ${build.dir}" />
+ <mkdir dir="${reports.dir}" />
<mkdir dir="${build.dir}/package/${package-name}-${version}" />
<copy todir="${build.dir}/package/${package-name}-${version}">
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <lso...@us...> - 2009-03-01 18:41:59
|
Revision: 517
http://pel.svn.sourceforge.net/pel/?rev=517&view=rev
Author: lsolesen
Date: 2009-03-01 18:41:55 +0000 (Sun, 01 Mar 2009)
Log Message:
-----------
Fixed directory to put the coverage report in.
Modified Paths:
--------------
trunk/build.xml
Modified: trunk/build.xml
===================================================================
--- trunk/build.xml 2009-03-01 18:16:01 UTC (rev 516)
+++ trunk/build.xml 2009-03-01 18:41:55 UTC (rev 517)
@@ -112,6 +112,6 @@
</target>
<target name="test">
- <exec dir="${tests.dir}" command="limb_unit --include=*.php --cover=../src/ --cover-report=../coverage" passthru="true" checkreturn="false" />
+ <exec dir="${tests.dir}" command="limb_unit --include=*.php --cover=../src/ --cover-report=${reports.coverage.dir}" passthru="true" checkreturn="false" />
</target>
</project>
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <lso...@us...> - 2009-03-01 18:16:10
|
Revision: 516
http://pel.svn.sourceforge.net/pel/?rev=516&view=rev
Author: lsolesen
Date: 2009-03-01 18:16:01 +0000 (Sun, 01 Mar 2009)
Log Message:
-----------
Improved the documentation target.
Modified Paths:
--------------
trunk/build.xml
Modified: trunk/build.xml
===================================================================
--- trunk/build.xml 2009-03-01 17:57:01 UTC (rev 515)
+++ trunk/build.xml 2009-03-01 18:16:01 UTC (rev 516)
@@ -108,7 +108,7 @@
</target>
<target name="php-documentor" depends="export">
- <exec dir="${source.dir}" command="phpdoc -ue on -t ${api.dir} -d ./src/" passthru="true" />
+ <exec dir="${source.dir}" command="phpdoc --sourcecode on --title 'PEL: PHP Exif Library${version}' --target ${api.dir} --directory tutorials,src --filename 'README,INSTALL,NEWS,TODO,ChangeLog'" passthru="true" />
</target>
<target name="test">
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <lso...@us...> - 2009-03-01 17:57:33
|
Revision: 515
http://pel.svn.sourceforge.net/pel/?rev=515&view=rev
Author: lsolesen
Date: 2009-03-01 17:57:01 +0000 (Sun, 01 Mar 2009)
Log Message:
-----------
Modified Paths:
--------------
trunk/test/ascii.php
trunk/test/bug1730993.php
trunk/test/convert.php
trunk/test/data-window.php
trunk/test/ifd.php
trunk/test/image-tests/canon-ixus-ii.php
trunk/test/image-tests/canon-powershot-s60.php
trunk/test/image-tests/leica-d-lux.php
trunk/test/image-tests/nikon-coolscan-iv.php
trunk/test/image-tests/nikon-e5000.php
trunk/test/image-tests/nikon-e950.php
trunk/test/image-tests/no-exif.php
trunk/test/image-tests/olympus-c5050z.php
trunk/test/image-tests/olympus-c50z.php
trunk/test/image-tests/olympus-c765uz.php
trunk/test/image-tests/pentax-istDS.php
trunk/test/image-tests/read-write.php
trunk/test/image-tests/sony-dsc-v1.php
trunk/test/number.php
trunk/test/undefined.php
Added Paths:
-----------
trunk/src/
trunk/src/Pel.php
trunk/src/PelConvert.php
trunk/src/PelDataWindow.php
trunk/src/PelEntry.php
trunk/src/PelEntryAscii.php
trunk/src/PelEntryByte.php
trunk/src/PelEntryLong.php
trunk/src/PelEntryNumber.php
trunk/src/PelEntryRational.php
trunk/src/PelEntryShort.php
trunk/src/PelEntryUndefined.php
trunk/src/PelException.php
trunk/src/PelExif.php
trunk/src/PelFormat.php
trunk/src/PelIfd.php
trunk/src/PelJpeg.php
trunk/src/PelJpegComment.php
trunk/src/PelJpegContent.php
trunk/src/PelJpegMarker.php
trunk/src/PelTag.php
trunk/src/PelTiff.php
Removed Paths:
-------------
trunk/Pel.php
trunk/PelConvert.php
trunk/PelDataWindow.php
trunk/PelEntry.php
trunk/PelEntryAscii.php
trunk/PelEntryByte.php
trunk/PelEntryLong.php
trunk/PelEntryNumber.php
trunk/PelEntryRational.php
trunk/PelEntryShort.php
trunk/PelEntryUndefined.php
trunk/PelException.php
trunk/PelExif.php
trunk/PelFormat.php
trunk/PelIfd.php
trunk/PelJpeg.php
trunk/PelJpegComment.php
trunk/PelJpegContent.php
trunk/PelJpegMarker.php
trunk/PelTag.php
trunk/PelTiff.php
trunk/test/image-tests/make-image-test.php
Property Changed:
----------------
trunk/
Property changes on: trunk
___________________________________________________________________
Modified: svn:ignore
- doc
locale
ChangeLog
build-base.*
+ doc
locale
ChangeLog
build-base.*
.project
Deleted: trunk/Pel.php
===================================================================
--- trunk/Pel.php 2009-03-01 17:54:26 UTC (rev 514)
+++ trunk/Pel.php 2009-03-01 17:57:01 UTC (rev 515)
@@ -1,372 +0,0 @@
-<?php
-
-/* PEL: PHP Exif Library. A library with support for reading and
- * writing all Exif headers in JPEG and TIFF images using PHP.
- *
- * Copyright (C) 2004, 2005, 2006, 2007 Martin Geisler.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program in the file COPYING; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
- * Boston, MA 02110-1301 USA
- */
-
-/* $Id$ */
-
-
-/**
- * Miscellaneous stuff for the overall behavior of PEL.
- *
- * @author Martin Geisler <mge...@us...>
- * @version $Revision$
- * @date $Date$
- * @license http://www.gnu.org/licenses/gpl.html GNU General Public
- * License (GPL)
- * @package PEL
- */
-
-
-/* Initialize Gettext, if available. This must be done before any
- * part of PEL calls Pel::tra() or Pel::fmt() --- this is ensured if
- * every piece of code using those two functions require() this file.
- *
- * If Gettext is not available, wrapper functions will be created,
- * allowing PEL to function, but without any translations.
- *
- * The PEL translations are stored in './locale'. It is important to
- * use an absolute path here because the lookups will be relative to
- * the current directory. */
-
-if (function_exists('dgettext')) {
- bindtextdomain('pel', dirname(__FILE__) . '/locale');
-} else {
-
- /**
- * Pretend to lookup a message in a specific domain.
- *
- * This is just a stub which will return the original message
- * untranslated. The function will only be defined if the Gettext
- * extension has not already defined it.
- *
- * @param string $domain the domain.
- *
- * @param string $str the message to be translated.
- *
- * @return string the original, untranslated message.
- */
- function dgettext($domain, $str) {
- return $str;
- }
-}
-
-
-/**
- * Class with miscellaneous static methods.
- *
- * This class will contain various methods that govern the overall
- * behavior of PEL.
- *
- * Debugging output from PEL can be turned on and off by assigning
- * true or false to {@link Pel::$debug}.
- *
- * @author Martin Geisler <mge...@us...>
- * @package PEL
- */
-class Pel {
-
- /**
- * Flag for controlling debug information.
- *
- * The methods producing debug information ({@link debug()} and
- * {@link warning()}) will only output something if this variable is
- * set to true.
- *
- * @var boolean
- */
- private static $debug = false;
-
- /**
- * Flag for strictness of parsing.
- *
- * If this variable is set to true, then most errors while loading
- * images will result in exceptions being thrown. Otherwise a
- * warning will be emitted (using {@link Pel::warning}) and the
- * exceptions will be appended to {@link Pel::$exceptions}.
- *
- * Some errors will still be fatal and result in thrown exceptions,
- * but an effort will be made to skip over as much garbage as
- * possible.
- *
- * @var boolean
- */
- private static $strict = false;
-
- /**
- * Stored exceptions.
- *
- * When {@link Pel::$strict} is set to false exceptions will be
- * accumulated here instead of being thrown.
- */
- private static $exceptions = array();
-
- /**
- * Quality setting for encoding JPEG images.
- *
- * This controls the quality used then PHP image resources are
- * encoded into JPEG images. This happens when you create a
- * {@link PelJpeg} object based on an image resource.
- *
- * The default is 75 for average quality images, but you can change
- * this to an integer between 0 and 100.
- *
- * @var int
- */
- private static $quality = 75;
-
-
- /**
- * Set the JPEG encoding quality.
- *
- * @param int $quality an integer between 0 and 100 with 75 being
- * average quality and 95 very good quality.
- */
- function setJPEGQuality($quality) {
- self::$quality = $quality;
- }
-
-
- /**
- * Get current setting for JPEG encoding quality.
- *
- * @return int the quality.
- */
- function getJPEGQuality() {
- return self::$quality;
- }
-
-
- /**
- * Return list of stored exceptions.
- *
- * When PEL is parsing in non-strict mode, it will store most
- * exceptions instead of throwing them. Use this method to get hold
- * of them when a call returns.
- *
- * Code for using this could look like this:
- *
- * <code>
- * Pel::setStrictParsing(true);
- * Pel::clearExceptions();
- *
- * $jpeg = new PelJpeg($file);
- *
- * // Check for exceptions.
- * foreach (Pel::getExceptions() as $e) {
- * printf("Exception: %s\n", $e->getMessage());
- * if ($e instanceof PelEntryException) {
- * // Warn about entries that couldn't be loaded.
- * printf("Warning: Problem with %s.\n",
- * PelTag::getName($e->getType(), $e->getTag()));
- * }
- * }
- * </code>
- *
- * This gives applications total control over the amount of error
- * messages shown and (hopefully) provides the necessary information
- * for proper error recovery.
- *
- * @return array the exceptions.
- */
- static function getExceptions() {
- return self::$exceptions;
- }
-
-
- /**
- * Clear list of stored exceptions.
- *
- * Use this function before a call to some method if you intend to
- * check for exceptions afterwards.
- */
- static function clearExceptions() {
- self::$exceptions = array();
- }
-
-
- /**
- * Conditionally throw an exception.
- *
- * This method will throw the passed exception when strict parsing
- * in effect (see {@link setStrictParsing()}). Otherwise the
- * exception is stored (it can be accessed with {@link
- * getExceptions()}) and a warning is issued (with {@link
- * Pel::warning}).
- *
- * @param PelException $e the exceptions.
- */
- static function maybeThrow(PelException $e) {
- if (self::$strict) {
- throw $e;
- } else {
- self::$exceptions[] = $e;
- self::warning('%s (%s:%s)', $e->getMessage(),
- basename($e->getFile()), $e->getLine());
- }
- }
-
-
- /**
- * Enable/disable strict parsing.
- *
- * If strict parsing is enabled, then most errors while loading
- * images will result in exceptions being thrown. Otherwise a
- * warning will be emitted (using {@link Pel::warning}) and the
- * exceptions will be stored for later use via {@link
- * getExceptions()}.
- *
- * Some errors will still be fatal and result in thrown exceptions,
- * but an effort will be made to skip over as much garbage as
- * possible.
- *
- * @param boolean $flag use true to enable strict parsing, false to
- * diable.
- */
- function setStrictParsing($flag) {
- self::$strict = $flag;
- }
-
-
- /**
- * Get current setting for strict parsing.
- *
- * @return boolean true if strict parsing is in effect, false
- * otherwise.
- */
- function getStrictParsing() {
- return self::$strict;
- }
-
-
- /**
- * Enable/disable debugging output.
- *
- * @param boolean $flag use true to enable debug output, false to
- * diable.
- */
- function setDebug($flag) {
- self::$debug = $flag;
- }
-
-
- /**
- * Get current setting for debug output.
- *
- * @return boolean true if debug is enabled, false otherwise.
- */
- function getDebug() {
- return self::$debug;
- }
-
-
- /**
- * Conditionally output debug information.
- *
- * This method works just like printf() except that it always
- * terminates the output with a newline, and that it only outputs
- * something if the {@link Pel::$debug} is true.
- *
- * @param string $format the format string.
- *
- * @param mixed $args,... any number of arguments can be given. The
- * arguments will be available for the format string as usual with
- * sprintf().
- */
- static function debug() {
- if (self::$debug) {
- $args = func_get_args();
- $str = array_shift($args);
- vprintf($str . "\n", $args);
- }
- }
-
-
- /**
- * Conditionally output a warning.
- *
- * This method works just like printf() except that it prepends the
- * output with the string 'Warning: ', terminates the output with a
- * newline, and that it only outputs something if the PEL_DEBUG
- * defined to some true value.
- *
- * @param string $format the format string.
- *
- * @param mixed $args,... any number of arguments can be given. The
- * arguments will be available for the format string as usual with
- * sprintf().
- */
- static function warning() {
- if (self::$debug) {
- $args = func_get_args();
- $str = array_shift($args);
- vprintf('Warning: ' . $str . "\n", $args);
- }
- }
-
-
- /**
- * Translate a string.
- *
- * This static function will use Gettext to translate a string. By
- * always using this function for static string one is assured that
- * the translation will be taken from the correct text domain.
- * Dynamic strings should be passed to {@link fmt} instead.
- *
- * @param string the string that should be translated.
- *
- * @return string the translated string, or the original string if
- * no translation could be found.
- */
- static function tra($str) {
- return dgettext('pel', $str);
- }
-
-
- /**
- * Translate and format a string.
- *
- * This static function will first use Gettext to translate a format
- * string, which will then have access to any extra arguments. By
- * always using this function for dynamic string one is assured that
- * the translation will be taken from the correct text domain. If
- * the string is static, use {@link tra} instead as it will be
- * faster.
- *
- * @param string $format the format string. This will be translated
- * before being used as a format string.
- *
- * @param mixed $args,... any number of arguments can be given. The
- * arguments will be available for the format string as usual with
- * sprintf().
- *
- * @return string the translated string, or the original string if
- * no translation could be found.
- */
- static function fmt() {
- $args = func_get_args();
- $str = array_shift($args);
- return vsprintf(dgettext('pel', $str), $args);
- }
-
-}
-
-?>
\ No newline at end of file
Deleted: trunk/PelConvert.php
===================================================================
--- trunk/PelConvert.php 2009-03-01 17:54:26 UTC (rev 514)
+++ trunk/PelConvert.php 2009-03-01 17:57:01 UTC (rev 515)
@@ -1,397 +0,0 @@
-<?php
-
-/* PEL: PHP Exif Library. A library with support for reading and
- * writing all Exif headers in JPEG and TIFF images using PHP.
- *
- * Copyright (C) 2004, 2005 Martin Geisler.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program in the file COPYING; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
- * Boston, MA 02110-1301 USA
- */
-
-/* $Id$ */
-
-
-/**
- * Routines for converting back and forth between bytes and integers.
- *
- * @author Martin Geisler <mge...@us...>
- * @version $Revision$
- * @date $Date$
- * @license http://www.gnu.org/licenses/gpl.html GNU General Public
- * License (GPL)
- * @package PEL
- */
-
-/**
- * Conversion functions to and from bytes and integers.
- *
- * The functions found in this class are used to convert bytes into
- * integers of several sizes ({@link bytesToShort}, {@link
- * bytesToLong}, and {@link bytesToRational}) and convert integers of
- * several sizes into bytes ({@link shortToBytes} and {@link
- * longToBytes}).
- *
- * All the methods are static and they all rely on an argument that
- * specifies the byte order to be used, this must be one of the class
- * constants {@link LITTLE_ENDIAN} or {@link BIG_ENDIAN}. These
- * constants will be referred to as the pseudo type PelByteOrder
- * throughout the documentation.
- *
- * @author Martin Geisler <mge...@us...>
- * @package PEL
- */
-class PelConvert {
-
- /**
- * Little-endian (Intel) byte order.
- *
- * Data stored in little-endian byte order store the least
- * significant byte first, so the number 0x12345678 becomes 0x78
- * 0x56 0x34 0x12 when stored with little-endian byte order.
- */
- const LITTLE_ENDIAN = true;
-
- /**
- * Big-endian (Motorola) byte order.
- *
- * Data stored in big-endian byte order store the most significant
- * byte first, so the number 0x12345678 becomes 0x12 0x34 0x56 0x78
- * when stored with big-endian byte order.
- */
- const BIG_ENDIAN = false;
-
-
- /**
- * Convert an unsigned short into two bytes.
- *
- * @param int the unsigned short that will be converted. The lower
- * two bytes will be extracted regardless of the actual size passed.
- *
- * @param PelByteOrder one of {@link LITTLE_ENDIAN} and {@link
- * BIG_ENDIAN}.
- *
- * @return string the bytes representing the unsigned short.
- */
- static function shortToBytes($value, $endian) {
- if ($endian == self::LITTLE_ENDIAN)
- return chr($value) . chr($value >> 8);
- else
- return chr($value >> 8) . chr($value);
- }
-
-
- /**
- * Convert a signed short into two bytes.
- *
- * @param int the signed short that will be converted. The lower
- * two bytes will be extracted regardless of the actual size passed.
- *
- * @param PelByteOrder one of {@link LITTLE_ENDIAN} and {@link
- * BIG_ENDIAN}.
- *
- * @return string the bytes representing the signed short.
- */
- static function sShortToBytes($value, $endian) {
- /* We can just use shortToBytes, since signed shorts fits well
- * within the 32 bit signed integers used in PHP. */
- return self::shortToBytes($value, $endian);
- }
-
-
- /**
- * Convert an unsigned long into four bytes.
- *
- * Because PHP limits the size of integers to 32 bit signed, one
- * cannot really have an unsigned integer in PHP. But integers
- * larger than 2^31-1 will be promoted to 64 bit signed floating
- * point numbers, and so such large numbers can be handled too.
- *
- * @param int the unsigned long that will be converted. The
- * argument will be treated as an unsigned 32 bit integer and the
- * lower four bytes will be extracted. Treating the argument as an
- * unsigned integer means that the absolute value will be used. Use
- * {@link sLongToBytes} to convert signed integers.
- *
- * @param PelByteOrder one of {@link LITTLE_ENDIAN} and {@link
- * BIG_ENDIAN}.
- *
- * @return string the bytes representing the unsigned long.
- */
- static function longToBytes($value, $endian) {
- /* We cannot convert the number to bytes in the normal way (using
- * shifts and modulo calculations) because the PHP operator >> and
- * function chr() clip their arguments to 2^31-1, which is the
- * largest signed integer known to PHP. But luckily base_convert
- * handles such big numbers. */
- $hex = str_pad(base_convert($value, 10, 16), 8, '0', STR_PAD_LEFT);
- if ($endian == self::LITTLE_ENDIAN)
- return (chr(hexdec($hex{6} . $hex{7})) .
- chr(hexdec($hex{4} . $hex{5})) .
- chr(hexdec($hex{2} . $hex{3})) .
- chr(hexdec($hex{0} . $hex{1})));
- else
- return (chr(hexdec($hex{0} . $hex{1})) .
- chr(hexdec($hex{2} . $hex{3})) .
- chr(hexdec($hex{4} . $hex{5})) .
- chr(hexdec($hex{6} . $hex{7})));
- }
-
-
- /**
- * Convert a signed long into four bytes.
- *
- * @param int the signed long that will be converted. The argument
- * will be treated as a signed 32 bit integer, from which the lower
- * four bytes will be extracted.
- *
- * @param PelByteOrder one of {@link LITTLE_ENDIAN} and {@link
- * BIG_ENDIAN}.
- *
- * @return string the bytes representing the signed long.
- */
- static function sLongToBytes($value, $endian) {
- /* We can convert the number into bytes in the normal way using
- * shifts and modulo calculations here (in contrast with
- * longToBytes) because PHP automatically handles 32 bit signed
- * integers for us. */
- if ($endian == self::LITTLE_ENDIAN)
- return (chr($value) .
- chr($value >> 8) .
- chr($value >> 16) .
- chr($value >> 24));
- else
- return (chr($value >> 24) .
- chr($value >> 16) .
- chr($value >> 8) .
- chr($value));
- }
-
-
- /**
- * Extract an unsigned byte from a string of bytes.
- *
- * @param string the bytes.
- *
- * @param int the offset. The byte found at the offset will be
- * returned as an integer. The must be at least one byte available
- * at offset.
- *
- * @return int the unsigned byte found at offset, e.g., an integer
- * in the range 0 to 255.
- */
- static function bytesToByte($bytes, $offset) {
- return ord($bytes{$offset});
- }
-
-
- /**
- * Extract a signed byte from bytes.
- *
- * @param string the bytes.
- *
- * @param int the offset. The byte found at the offset will be
- * returned as an integer. The must be at least one byte available
- * at offset.
- *
- * @return int the signed byte found at offset, e.g., an integer in
- * the range -128 to 127.
- */
- static function bytesToSByte($bytes, $offset) {
- $n = self::bytesToByte($bytes, $offset);
- if ($n > 127)
- return $n - 256;
- else
- return $n;
- }
-
-
- /**
- * Extract an unsigned short from bytes.
- *
- * @param string the bytes.
- *
- * @param int the offset. The short found at the offset will be
- * returned as an integer. There must be at least two bytes
- * available beginning at the offset given.
- *
- * @return int the unsigned short found at offset, e.g., an integer
- * in the range 0 to 65535.
- *
- * @param PelByteOrder one of {@link LITTLE_ENDIAN} and {@link
- * BIG_ENDIAN}.
- */
- static function bytesToShort($bytes, $offset, $endian) {
- if ($endian == self::LITTLE_ENDIAN)
- return (ord($bytes{$offset+1}) * 256 +
- ord($bytes{$offset}));
- else
- return (ord($bytes{$offset}) * 256 +
- ord($bytes{$offset+1}));
- }
-
-
- /**
- * Extract a signed short from bytes.
- *
- * @param string the bytes.
- *
- * @param int the offset. The short found at offset will be returned
- * as an integer. There must be at least two bytes available
- * beginning at the offset given.
- *
- * @return int the signed byte found at offset, e.g., an integer in
- * the range -32768 to 32767.
- *
- * @param PelByteOrder one of {@link LITTLE_ENDIAN} and {@link
- * BIG_ENDIAN}.
- */
- static function bytesToSShort($bytes, $offset, $endian) {
- $n = self::bytesToShort($bytes, $offset, $endian);
- if ($n > 32767)
- return $n - 65536;
- else
- return $n;
- }
-
-
- /**
- * Extract an unsigned long from bytes.
- *
- * @param string the bytes.
- *
- * @param int the offset. The long found at offset will be returned
- * as an integer. There must be at least four bytes available
- * beginning at the offset given.
- *
- * @return int the unsigned long found at offset, e.g., an integer
- * in the range 0 to 4294967295.
- *
- * @param PelByteOrder one of {@link LITTLE_ENDIAN} and {@link
- * BIG_ENDIAN}.
- */
- static function bytesToLong($bytes, $offset, $endian) {
- if ($endian == self::LITTLE_ENDIAN)
- return (ord($bytes{$offset+3}) * 16777216 +
- ord($bytes{$offset+2}) * 65536 +
- ord($bytes{$offset+1}) * 256 +
- ord($bytes{$offset}));
- else
- return (ord($bytes{$offset}) * 16777216 +
- ord($bytes{$offset+1}) * 65536 +
- ord($bytes{$offset+2}) * 256 +
- ord($bytes{$offset+3}));
- }
-
-
- /**
- * Extract a signed long from bytes.
- *
- * @param string the bytes.
- *
- * @param int the offset. The long found at offset will be returned
- * as an integer. There must be at least four bytes available
- * beginning at the offset given.
- *
- * @return int the signed long found at offset, e.g., an integer in
- * the range -2147483648 to 2147483647.
- *
- * @param PelByteOrder one of {@link LITTLE_ENDIAN} and {@link
- * BIG_ENDIAN}.
- */
- static function bytesToSLong($bytes, $offset, $endian) {
- $n = self::bytesToLong($bytes, $offset, $endian);
- if ($n > 2147483647)
- return $n - 4294967296;
- else
- return $n;
- }
-
-
- /**
- * Extract an unsigned rational from bytes.
- *
- * @param string the bytes.
- *
- * @param int the offset. The rational found at offset will be
- * returned as an array. There must be at least eight bytes
- * available beginning at the offset given.
- *
- * @return array the unsigned rational found at offset, e.g., an
- * array with two integers in the range 0 to 4294967295.
- *
- * @param PelByteOrder one of {@link LITTLE_ENDIAN} and {@link
- * BIG_ENDIAN}.
- */
- static function bytesToRational($bytes, $offset, $endian) {
- return array(self::bytesToLong($bytes, $offset, $endian),
- self::bytesToLong($bytes, $offset+4, $endian));
- }
-
-
- /**
- * Extract a signed rational from bytes.
- *
- * @param string the bytes.
- *
- * @param int the offset. The rational found at offset will be
- * returned as an array. There must be at least eight bytes
- * available beginning at the offset given.
- *
- * @return array the signed rational found at offset, e.g., an array
- * with two integers in the range -2147483648 to 2147483647.
- *
- * @param PelByteOrder one of {@link LITTLE_ENDIAN} and {@link
- * BIG_ENDIAN}.
- */
- static function bytesToSRational($bytes, $offset, $endian) {
- return array(self::bytesToSLong($bytes, $offset, $endian),
- self::bytesToSLong($bytes, $offset+4, $endian));
- }
-
-
- /**
- * Format bytes for dumping.
- *
- * This method is for debug output, it will format a string as a
- * hexadecimal dump suitable for display on a terminal. The output
- * is printed directly to standard out.
- *
- * @param string the bytes that will be dumped.
- *
- * @param int the maximum number of bytes to dump. If this is left
- * out (or left to the default of 0), then the entire string will be
- * dumped.
- */
- static function bytesToDump($bytes, $max = 0) {
- $s = strlen($bytes);
-
- if ($max > 0)
- $s = min($max, $s);
-
- $line = 24;
-
- for ($i = 0; $i < $s; $i++) {
- printf('%02X ', ord($bytes{$i}));
-
- if (($i+1) % $line == 0)
- print("\n");
- }
- print("\n");
- }
-
-}
-
-?>
\ No newline at end of file
Deleted: trunk/PelDataWindow.php
===================================================================
--- trunk/PelDataWindow.php 2009-03-01 17:54:26 UTC (rev 514)
+++ trunk/PelDataWindow.php 2009-03-01 17:57:01 UTC (rev 515)
@@ -1,540 +0,0 @@
-<?php
-
-/* PEL: PHP Exif Library. A library with support for reading and
- * writing all Exif headers in JPEG and TIFF images using PHP.
- *
- * Copyright (C) 2004, 2005, 2006, 2007 Martin Geisler.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program in the file COPYING; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
- * Boston, MA 02110-1301 USA
- */
-
-/* $Id$ */
-
-
-/**
- * A container for bytes with a limited window of accessible bytes.
- *
- * @author Martin Geisler <mge...@us...>
- * @version $Revision$
- * @date $Date$
- * @license http://www.gnu.org/licenses/gpl.html GNU General Public License (GPL)
- * @package PEL
- */
-
-/**#@+ Required class definitions. */
-require_once('PelException.php');
-require_once('PelConvert.php');
-/**#@-*/
-
-
-/**
- * An exception thrown when an invalid offset is encountered.
- *
- * @package PEL
- * @subpackage Exception
- */
-class PelDataWindowOffsetException extends PelException {}
-
-/**
- * An exception thrown when an invalid window is encountered.
- *
- * @package PEL
- * @subpackage Exception
- */
-class PelDataWindowWindowException extends PelException {}
-
-/**
- * The window.
- *
- * @package PEL
- */
-class PelDataWindow {
-
- /**
- * The data held by this window.
- *
- * The string can contain any kind of data, including binary data.
- *
- * @var string
- */
- private $data = '';
-
- /**
- * The byte order currently in use.
- *
- * This will be the byte order used when data is read using the for
- * example the {@link getShort} function. It must be one of {@link
- * PelConvert::LITTLE_ENDIAN} and {@link PelConvert::BIG_ENDIAN}.
- *
- * @var PelByteOrder
- * @see setByteOrder, getByteOrder
- */
- private $order;
-
- /**
- * The start of the current window.
- *
- * All offsets used for access into the data will count from this
- * offset, effectively limiting access to a window starting at this
- * byte.
- *
- * @var int
- * @see setWindowStart
- */
- private $start = 0;
-
- /**
- * The size of the current window.
- *
- * All offsets used for access into the data will be limited by this
- * variable. A valid offset must be strictly less than this
- * variable.
- *
- * @var int
- * @see setWindowSize
- */
- private $size = 0;
-
-
- /**
- * Construct a new data window with the data supplied.
- *
- * @param mixed the data that this window will contain. This can
- * either be given as a string (interpreted litteraly as a sequence
- * of bytes) or a PHP image resource handle. The data will be copied
- * into the new data window.
- *
- * @param boolean the initial byte order of the window. This must
- * be either {@link PelConvert::LITTLE_ENDIAN} or {@link
- * PelConvert::BIG_ENDIAN}. This will be used when integers are
- * read from the data, and it can be changed later with {@link
- * setByteOrder()}.
- */
- function __construct($data = '', $endianess = PelConvert::LITTLE_ENDIAN) {
- if (is_string($data)) {
- $this->data = $data;
- } elseif (is_resource($data) && get_resource_type($data) == 'gd') {
- /* The ImageJpeg() function insists on printing the bytes
- * instead of returning them in a more civil way as a string, so
- * we have to buffer the output... */
- ob_start();
- ImageJpeg($data, null, Pel::$quality);
- $this->data = ob_get_clean();
- } else {
- throw new PelInvalidArgumentException('Bad type for $data: %s',
- gettype($data));
- }
-
- $this->order = $endianess;
- $this->size = strlen($data);
- }
-
-
- /**
- * Get the size of the data window.
- *
- * @return int the number of bytes covered by the window. The
- * allowed offsets go from 0 up to this number minus one.
- *
- * @see getBytes()
- */
- function getSize() {
- return $this->size;
- }
-
-
- /**
- * Change the byte order of the data.
- *
- * @param PelByteOrder the new byte order. This must be either
- * {@link PelConvert::LITTLE_ENDIAN} or {@link
- * PelConvert::BIG_ENDIAN}.
- */
- function setByteOrder($o) {
- $this->order = $o;
- }
-
-
- /**
- * Get the currently used byte order.
- *
- * @return PelByteOrder this will be either {@link
- * PelConvert::LITTLE_ENDIAN} or {@link PelConvert::BIG_ENDIAN}.
- */
- function getByteOrder() {
- return $this->order;
- }
-
-
- /* Move the start of the window forward.
- *
- * @param int the new start of the window. All new offsets will be
- * calculated from this new start offset, and the size of the window
- * will shrink to keep the end of the window in place.
- */
- function setWindowStart($start) {
- if ($start < 0 || $start > $this->size)
- throw new PelDataWindowWindowException('Window [%d, %d] does ' .
- 'not fit in window [0, %d]',
- $start, $this->size, $this->size);
-
- $this->start += $start;
- $this->size -= $start;
- }
-
-
- /**
- * Adjust the size of the window.
- *
- * The size can only be made smaller.
- *
- * @param int the desired size of the window. If the argument is
- * negative, the window will be shrunk by the argument.
- */
- function setWindowSize($size) {
- if ($size < 0)
- $size += $this->size;
-
- if ($size < 0 || $size > $this->size)
- throw new PelDataWindowWindowException('Window [0, %d] ' .
- 'does not fit in window [0, %d]',
- $size, $this->size);
- $this->size = $size;
- }
-
-
- /**
- * Make a new data window with the same data as the this window.
- *
- * @param mixed if an integer is supplied, then it will be the start
- * of the window in the clone. If left unspecified, then the clone
- * will inherit the start from this object.
- *
- * @param mixed if an integer is supplied, then it will be the size
- * of the window in the clone. If left unspecified, then the clone
- * will inherit the size from this object.
- *
- * @return PelDataWindow a new window that operates on the same data
- * as this window, but (optionally) with a smaller window size.
- */
- function getClone($start = false, $size = false) {
- $c = clone $this;
-
- if (is_int($start))
- $c->setWindowStart($start);
-
- if (is_int($size))
- $c->setWindowSize($size);
-
- return $c;
- }
-
-
- /**
- * Validate an offset against the current window.
- *
- * @param int the offset to be validated. If the offset is negative
- * or if it is greater than or equal to the current window size,
- * then a {@link PelDataWindowOffsetException} is thrown.
- *
- * @return void if the offset is valid nothing is returned, if it is
- * invalid a new {@link PelDataWindowOffsetException} is thrown.
- */
- private function validateOffset($o) {
- if ($o < 0 || $o >= $this->size)
- throw new PelDataWindowOffsetException('Offset %d not within [%d, %d]',
- $o, 0, $this->size-1);
- }
-
-
- /**
- * Return some or all bytes visible in the window.
- *
- * This method works just like the standard {@link substr()}
- * function in PHP with the exception that it works within the
- * window of accessible bytes and does strict range checking.
- *
- * @param int the offset to the first byte returned. If a negative
- * number is given, then the counting will be from the end of the
- * window. Invalid offsets will result in a {@link
- * PelDataWindowOffsetException} being thrown.
- *
- * @param int the size of the sub-window. If a negative number is
- * given, then that many bytes will be omitted from the result.
- *
- * @return string a subset of the bytes in the window. This will
- * always return no more than {@link getSize()} bytes.
- */
- function getBytes($start = false, $size = false) {
- if (is_int($start)) {
- if ($start < 0)
- $start += $this->size;
-
- $this->validateOffset($start);
- } else {
- $start = 0;
- }
-
- if (is_int($size)) {
- if ($size <= 0)
- $size += $this->size - $start;
-
- $this->validateOffset($start+$size);
- } else {
- $size = $this->size - $start;
- }
-
- return substr($this->data, $this->start + $start, $size);
- }
-
-
- /**
- * Return an unsigned byte from the data.
- *
- * @param int the offset into the data. An offset of zero will
- * return the first byte in the current allowed window. The last
- * valid offset is equal to {@link getSize()}-1. Invalid offsets
- * will result in a {@link PelDataWindowOffsetException} being
- * thrown.
- *
- * @return int the unsigned byte found at offset.
- */
- function getByte($o = 0) {
- /* Validate the offset --- this throws an exception if offset is
- * out of range. */
- $this->validateOffset($o);
-
- /* Translate the offset into an offset into the data. */
- $o += $this->start;
-
- /* Return an unsigned byte. */
- return PelConvert::bytesToByte($this->data, $o);
- }
-
-
- /**
- * Return a signed byte from the data.
- *
- * @param int the offset into the data. An offset of zero will
- * return the first byte in the current allowed window. The last
- * valid offset is equal to {@link getSize()}-1. Invalid offsets
- * will result in a {@link PelDataWindowOffsetException} being
- * thrown.
- *
- * @return int the signed byte found at offset.
- */
- function getSByte($o = 0) {
- /* Validate the offset --- this throws an exception if offset is
- * out of range. */
- $this->validateOffset($o);
-
- /* Translate the offset into an offset into the data. */
- $o += $this->start;
-
- /* Return a signed byte. */
- return PelConvert::bytesToSByte($this->data, $o);
- }
-
-
- /**
- * Return an unsigned short read from the data.
- *
- * @param int the offset into the data. An offset of zero will
- * return the first short available in the current allowed window.
- * The last valid offset is equal to {@link getSize()}-2. Invalid
- * offsets will result in a {@link PelDataWindowOffsetException}
- * being thrown.
- *
- * @return int the unsigned short found at offset.
- */
- function getShort($o = 0) {
- /* Validate the offset+1 to see if we can safely get two bytes ---
- * this throws an exception if offset is out of range. */
- $this->validateOffset($o);
- $this->validateOffset($o+1);
-
- /* Translate the offset into an offset into the data. */
- $o += $this->start;
-
- /* Return an unsigned short. */
- return PelConvert::bytesToShort($this->data, $o, $this->order);
- }
-
-
- /**
- * Return a signed short read from the data.
- *
- * @param int the offset into the data. An offset of zero will
- * return the first short available in the current allowed window.
- * The last valid offset is equal to {@link getSize()}-2. Invalid
- * offsets will result in a {@link PelDataWindowOffsetException}
- * being thrown.
- *
- * @return int the signed short found at offset.
- */
- function getSShort($o = 0) {
- /* Validate the offset+1 to see if we can safely get two bytes ---
- * this throws an exception if offset is out of range. */
- $this->validateOffset($o);
- $this->validateOffset($o+1);
-
- /* Translate the offset into an offset into the data. */
- $o += $this->start;
-
- /* Return a signed short. */
- return PelConvert::bytesToSShort($this->data, $o, $this->order);
- }
-
-
- /**
- * Return an unsigned long read from the data.
- *
- * @param int the offset into the data. An offset of zero will
- * return the first long available in the current allowed window.
- * The last valid offset is equal to {@link getSize()}-4. Invalid
- * offsets will result in a {@link PelDataWindowOffsetException}
- * being thrown.
- *
- * @return int the unsigned long found at offset.
- */
- function getLong($o = 0) {
- /* Validate the offset+3 to see if we can safely get four bytes
- * --- this throws an exception if offset is out of range. */
- $this->validateOffset($o);
- $this->validateOffset($o+3);
-
- /* Translate the offset into an offset into the data. */
- $o += $this->start;
-
- /* Return an unsigned long. */
- return PelConvert::bytesToLong($this->data, $o, $this->order);
- }
-
-
- /**
- * Return a signed long read from the data.
- *
- * @param int the offset into the data. An offset of zero will
- * return the first long available in the current allowed window.
- * The last valid offset is equal to {@link getSize()}-4. Invalid
- * offsets will result in a {@link PelDataWindowOffsetException}
- * being thrown.
- *
- * @return int the signed long found at offset.
- */
- function getSLong($o = 0) {
- /* Validate the offset+3 to see if we can safely get four bytes
- * --- this throws an exception if offset is out of range. */
- $this->validateOffset($o);
- $this->validateOffset($o+3);
-
- /* Translate the offset into an offset into the data. */
- $o += $this->start;
-
- /* Return a signed long. */
- return PelConvert::bytesToSLong($this->data, $o, $this->order);
- }
-
-
- /**
- * Return an unsigned rational read from the data.
- *
- * @param int the offset into the data. An offset of zero will
- * return the first rational available in the current allowed
- * window. The last valid offset is equal to {@link getSize()}-8.
- * Invalid offsets will result in a {@link
- * PelDataWindowOffsetException} being thrown.
- *
- * @return array the unsigned rational found at offset. A rational
- * number is represented as an array of two numbers: the enumerator
- * and denominator. Both of these numbers will be unsigned longs.
- */
- function getRational($o = 0) {
- return array($this->getLong($o), $this->getLong($o+4));
- }
-
-
- /**
- * Return a signed rational read from the data.
- *
- * @param int the offset into the data. An offset of zero will
- * return the first rational available in the current allowed
- * window. The last valid offset is equal to {@link getSize()}-8.
- * Invalid offsets will result in a {@link
- * PelDataWindowOffsetException} being thrown.
- *
- * @return array the signed rational found at offset. A rational
- * number is represented as an array of two numbers: the enumerator
- * and denominator. Both of these numbers will be signed longs.
- */
- function getSRational($o = 0) {
- return array($this->getSLong($o), $this->getSLong($o+4));
- }
-
-
- /**
- * String comparison on substrings.
- *
- * @param int the offset into the data. An offset of zero will make
- * the comparison start with the very first byte available in the
- * window. The last valid offset is equal to {@link getSize()}
- * minus the length of the string. If the string is too long, then
- * a {@link PelDataWindowOffsetException} will be thrown.
- *
- * @param string the string to compare with.
- *
- * @return boolean true if the string given matches the data in the
- * window, at the specified offset, false otherwise. The comparison
- * will stop as soon as a mismatch if found.
- */
- function strcmp($o, $str) {
- /* Validate the offset of the final character we might have to
- * check. */
- $s = strlen($str);
- $this->validateOffset($o);
- $this->validateOffset($o + $s - 1);
-
- /* Translate the offset into an offset into the data. */
- $o += $this->start;
-
- /* Check each character, return as soon as the answer is known. */
- for ($i = 0; $i < $s; $i++) {
- if ($this->data{$o + $i} != $str{$i})
- return false;
- }
-
- /* All characters matches each other, return true. */
- return true;
- }
-
-
- /**
- * Return a string representation of the data window.
- *
- * @return string a description of the window with information about
- * the number of bytes accessible, the total number of bytes, and
- * the window start and stop.
- */
- function __toString() {
- return Pel::fmt('DataWindow: %d bytes in [%d, %d] of %d bytes',
- $this->size,
- $this->start, $this->start + $this->size,
- strlen($this->data));
- }
-
-}
-
-?>
\ No newline at end of file
Deleted: trunk/PelEntry.php
===================================================================
--- trunk/PelEntry.php 2009-03-01 17:54:26 UTC (rev 514)
+++ trunk/PelEntry.php 2009-03-01 17:57:01 UTC (rev 515)
@@ -1,382 +0,0 @@
-<?php
-
-/* PEL: PHP Exif Library. A library with support for reading and
- * writing all Exif headers in JPEG and TIFF images using PHP.
- *
- * Copyright (C) 2004, 2005, 2006 Martin Geisler.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program in the file COPYING; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
- * Boston, MA 02110-1301 USA
- */
-
-/* $Id$ */
-
-
-/**
- * Classes for dealing with Exif entries.
- *
- * This file defines two exception classes and the abstract class
- * {@link PelEntry} which provides the basic methods that all Exif
- * entries will have. All Exif entries will be represented by
- * descendants of the {@link PelEntry} class --- the class itself is
- * abstract and so it cannot be instantiated.
- *
- * @author Martin Geisler <mge...@us...>
- * @version $Revision$
- * @date $Date$
- * @license http://www.gnu.org/licenses/gpl.html GNU General Public
- * License (GPL)
- * @package PEL
- */
-
-/**#@+ Required class definitions. */
-require_once('PelException.php');
-require_once('PelFormat.php');
-require_once('PelTag.php');
-require_once('Pel.php');
-/**#@-*/
-
-
-/**
- * Exception indicating a problem with an entry.
- *
- * @author Martin Geisler <mge...@us...>
- * @package PEL
- * @subpackage Exception
- */
-class PelEntryException extends PelException {
-
- /**
- * The IFD type (if known).
- *
- * @var int
- */
- protected $type;
-
- /**
- * The tag of the entry (if known).
- *
- * @var PelTag
- */
- protected $tag;
-
- /**
- * Get the IFD type associated with the exception.
- *
- * @return int one of {@link PelIfd::IFD0}, {@link PelIfd::IFD1},
- * {@link PelIfd::EXIF}, {@link PelIfd::GPS}, or {@link
- * PelIfd::INTEROPERABILITY}. If no type is set, null is returned.
- */
- function getIfdType() {
- return $this->type;
- }
-
-
- /**
- * Get the tag associated with the exception.
- *
- * @return PelTag the tag. If no tag is set, null is returned.
- */
- function getTag() {
- return $this->tag;
- }
-
-}
-
-
-/**
- * Exception indicating that an unexpected format was found.
- *
- * The documentation for each tag in {@link PelTag} will detail any
- * constrains.
- *
- * @author Martin Geisler <mge...@us...>
- * @package PEL
- * @subpackage Exception
- */
-class PelUnexpectedFormatException extends PelEntryException {
-
- /**
- * Construct a new exception indicating an invalid format.
- *
- * @param int the type of IFD.
- *
- * @param PelTag the tag for which the violation was found.
- *
- * @param PelFormat the format found.
- *
- * @param PelFormat the expected format.
- */
- function __construct($type, $tag, $found, $expected) {
- parent::__construct('Unexpected format found for %s tag: PelFormat::%s. ' .
- 'Expected PelFormat::%s instead.',
- PelTag::getName($type, $tag),
- strtoupper(PelFormat::getName($found)),
- strtoupper(PelFormat::getName($expected)));
- $this->tag = $tag;
- $this->type = $type;
- }
-}
-
-
-/**
- * Exception indicating that an unexpected number of components was
- * found.
- *
- * Some tags have strict limits as to the allowed number of
- * components, and this exception is thrown if the data violates such
- * a constraint. The documentation for each tag in {@link PelTag}
- * explains the expected number of components.
- *
- * @author Martin Geisler <mge...@us...>
- * @package PEL
- * @subpackage Exception
- */
-class PelWrongComponentCountException extends PelEntryException {
-
- /**
- * Construct a new exception indicating a wrong number of
- * components.
- *
- * @param int the type of IFD.
- *
- * @param PelTag the tag for which the violation was found.
- *
- * @param int the number of components found.
- *
- * @param int the expected number of components.
- */
- function __construct($type, $tag, $found, $expected) {
- parent::__construct('Wrong number of components found for %s tag: %d. ' .
- 'Expected %d.',
- PelTag::getName($type, $tag), $found, $expected);
- $this->tag = $tag;
- $this->type = $type;
- }
-}
-
-
-/**
- * Common ancestor class of all {@link PelIfd} entries.
- *
- * As this class is abstract you cannot instantiate objects from it.
- * It only serves as a common ancestor to define the methods common to
- * all entries. The most important methods are {@link getValue()} and
- * {@link setValue()}, both of which is abstract in this class. The
- * descendants will give concrete implementations for them.
- *
- * If you have some data coming from an image (some raw bytes), then
- * the static method {@link newFromData()} is helpful --- it will look
- * at the data and give you a proper decendent of {@link PelEntry}
- * back.
- *
- * If you instead want to have an entry for some data which take the
- * form of an integer, a string, a byte, or some other PHP type, then
- * don't use this class. You should instead create an object of the
- * right subclass ({@link PelEntryShort} for short integers, {@link
- * PelEntryAscii} for strings, and so on) directly.
- *
- * @author Martin Geisler <mge...@us...>
- * @package PEL
- */
-abstract class PelEntry {
-
- /**
- * Type of IFD containing this tag.
- *
- * This must be one of the constants defined in {@link PelIfd}:
- * {@link PelIfd::IFD0} for the main image IFD, {@link PelIfd::IFD1}
- * for the thumbnail image IFD, {@link PelIfd::EXIF} for the Exif
- * sub-IFD, {@link PelIfd::GPS} for the GPS sub-IFD, or {@link
- * PelIfd::INTEROPERABILITY} for the interoperability sub-IFD.
- *
- * @var int
- */
- protected $ifd_type;
-
- /**
- * The bytes representing this entry.
- *
- * Subclasses must either override {@link getBytes()} or, if
- * possible, maintain this property so that it always contains a
- * true representation of the entry.
- *
- * @var string
- */
- protected $bytes = '';
-
- /**
- * The {@link PelTag} of this entry.
- *
- * @var PelTag
- */
- protected $tag;
-
- /**
- * The {@link PelFormat} of this entry.
- *
- * @var PelFormat
- */
- protected $format;
-
- /**
- * The number of components of this entry.
- *
- * @var int
- */
- protected $components;
-
-
- /**
- * Return the tag of this entry.
- *
- * @return PelTag the tag of this entry.
- */
- function getTag() {
- return $this->tag;
- }
-
-
- /**
- * Return the type of IFD which holds this entry.
- *
- * @return int one of the constants defined in {@link PelIfd}:
- * {@link PelIfd::IFD0} for the main image IFD, {@link PelIfd::IFD1}
- * for the thumbnail image IFD, {@link PelIfd::EXIF} for the Exif
- * sub-IFD, {@link PelIfd::GPS} for the GPS sub-IFD, or {@link
- * PelIfd::INTEROPERABILITY} for the interoperability sub-IFD.
- */
- function getIfdType() {
- return $this->ifd_type;
- }
-
-
- /**
- * Update the IFD type.
- *
- * @param int must be one of the constants defined in {@link
- * PelIfd}: {@link PelIfd::IFD0} for the main image IFD, {@link
- * PelIfd::IFD1} for the thumbnail image IFD, {@link PelIfd::EXIF}
- * for the Exif sub-IFD, {@link PelIfd::GPS} for the GPS sub-IFD, or
- * {@link PelIfd::INTEROPERABILITY} for the interoperability
- * sub-IFD.
- */
- function setIfdType($type) {
- $this->ifd_type = $type;
- }
-
-
- /**
- * Return the format of this entry.
- *
- * @return PelFormat the format of this entry.
- */
- function getFormat() {
- return $this->format;
- }
-
-
- /**
- * Return the number of components of this entry.
- *
- * @return int the number of components of this entry.
- */
- function getComponents() {
- return $this->components;
- }
-
-
- /**
- * Turn this entry into bytes.
- *
- * @param PelByteOrder the desired byte order, which must be either
- * {@link Convert::LITTLE_ENDIAN} or {@link Convert::BIG_ENDIAN}.
- *
- * @return string bytes representing this entry.
- */
- function getBytes($o) {
- return $this->bytes;
- }
-
-
- /**
- * Get the value of this entry as text.
- *
- * The value will be returned in a format suitable for presentation,
- * e.g., rationals will be returned as 'x/y', ASCII strings will be
- * returned as themselves etc.
- *
- * @param boolean some values can be returned in a long or more
- * brief form, and this parameter controls that.
- *
- * @return string the value as text.
- */
- abstract function getText($brief = false);
-
-
- /**
- * Get the value of this entry.
- *
- * The value returned will generally be the same as the one supplied
- * to the constructor or with {@link setValue()}. For a formatted
- * version of the value, one should use {@link getText()} instead.
- *
- * @return mixed the unformatted value.
- */
- abstract function getValue();
-
-
- /**
- * Set the value of this entry.
- *
- * The value should be in the same format as for the constructor.
- *
- * @param mixed the new value.
- *
- * @abstract
- */
- function setValue($value) {
- /* This (fake) abstract method is here to make it possible for the
- * documentation to refer to PelEntry::setValue().
- *
- * It cannot declared abstract in the proper PHP way, for then PHP
- * wont allow subclasses to define it with two arguments (which is
- * what PelEntryCopyright does).
- */
- throw new PelException('setValue() is abstract.');
- }
-
-
- /**
- * Turn this entry into a string.
- *
- * @return string a string representation of this entry. This is
- * mostly for debugging.
- */
- function __toString() {
- $str = Pel::fmt(" Tag: 0x%04X (%s)\n",
- $this->tag, PelTag::getName($this->ifd_type, $this->tag));
- $str .= Pel::fmt(" Format : %d (%s)\n",
- $this->format, PelFormat::getName($this->format));
- $str .= Pel::fmt(" Components: %d\n", $this->components);
- if ($this->getTag() != PelTag::MAKER_NOTE &&
- $this->getTag() != PelTag::PRINT_IM)
- $str .= Pel::fmt(" Value : %s\n", print_r($this->getValue(), true));
- $str .= Pel::fmt(" Text : %s\n", $this->getText());
- return $str;
- }
-}
-
-?>
\ No newline at end of file
Deleted: trunk/PelEntryAscii.php
===================================================================
--- trunk/PelEntryAscii.php 2009-03-01 17:54:26 UTC (rev 514)
+++ trunk/PelEntryAscii.php 2009-03-01 17:57:01 UTC (rev 515)
@@ -1,561 +0,0 @@
-<?php
-
-/* PEL: PHP Exif Library. A library with support for reading and
- * writing all Exif headers in JPEG and TIFF images using PHP.
- *
- * Copyright (C) 2004, 2005, 2006, 2007 Martin Geisler.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program in the file COPYING; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
- * Boston, MA 02110-1301 USA
- */
-
-/* $Id$ */
-
-
-/**
- * Classes used to hold ASCII strings.
- *
- * The classes defined here are to be used for Exif entries holding
- * ASCII strings, such as {@link PelTag::MAKE}, {@link
- * PelTag::SOFTWARE}, and {@link PelTag::DATE_TIME}. For
- * entries holding normal textual ASCII strings the class {@link
- * PelEntryAscii} should be used, but for entries holding
- * timestamps the class {@link PelEntryTime} would be more
- * convenient instead. Copyright information is handled by the {@link
- * PelEntryCopyright} class.
- *
- * @author Martin Geisler <mge...@us...>
- * @version $Revision$
- * @date $Date$
- * @license http://www.gnu.org/licenses/gpl.html GNU General Public
- * License (GPL)
- * @package PEL
- */
-
-/**#@+ Required class definitions. */
-require_once('PelEntry.php');
-/**#@-*/
-
-
-/**
- * Class for holding a plain ASCII string.
- *
- * This class can hold a single ASCII string, and it will be used as in
- * <code>
- * $entry = $ifd->getEntry(PelTag::IMAGE_DESCRIPTION);
- * print($entry->getValue());
- * $entry->setValue('This is my image. I like it.');
- * </code>
- *
- * @author Martin Geisler <mge...@us...>
- * @package PEL
- */
-class PelEntryAscii extends PelEntry {
-
- /**
- * The string hold by this entry.
- *
- * This is the string that was given to the {@link __construct
- * constructor} or later to {@link setValue}, without any final NULL
- * character.
- *
- * @var string
- */
- private $str;
-
-
- /**
- * Make a new PelEntry that can hold an ASCII string.
- *
- * @param int the tag which this entry represents. This should be
- * one of the constants defined in {@link PelTag}, e.g., {@link
- * PelTag::IMAGE_DESCRIPTION}, {@link PelTag::MODEL}, or any other
- * tag with format {@link PelFormat::ASCII}.
- *
- * @param string the string that this entry will represent. The
- * string must obey the same rules as the string argument to {@link
- * setValue}, namely that it should be given without any trailing
- * NULL character and that it must be plain 7-bit ASCII.
- */
- function __construct($tag, $str = '') {
- $this->tag = $tag;
- $this->format = PelFormat::ASCII;
- self::setValue($str);
- }
-
-
- /**
- * Give the entry a new ASCII value.
- *
- * This will overwrite the previous value. The value can be
- * retrieved later with the {@link getValue} method.
- *
- * @param string the new value of the entry. This should be given
- * without any trailing NULL character. The string must be plain
- * 7-bit ASCII, the string should contain no high bytes.
- *
- * @todo Implement check for high bytes?
- */
- function setValue($str) {
- $this->components = strlen($str)+1;
- $this->str = $str;
- $this->bytes = $str . chr(0x00);
- }
-
-
- /**
- * Return the ASCII string of the entry.
- *
- * @return string the string held, without any final NULL character.
- * The string will be the same as the one given to {@link setValue}
- * or to the {@link __construct constructor}.
- */
- function getValue() {
- return $this->str;
- }
-
-
- /**
- * Return the ASCII string of the entry.
- *
- * This methods returns the same as {@link getValue}.
- *
- * @param boolean not used with ASCII entries.
- *
- * @return string the string held, without any final NULL character.
- * The string will be the same as the one given to {@link setValue}
- * or to the {@link __construct constructor}.
- */
- function getText($brief = false) {
- return $this->str;
- }
-
-}
-
-
-/**
- * Class for holding a date and time.
- *
- * This class can hold a timestamp, and it will be used as
- * in this example where the time is advanced by one week:
- * <code>
- * $entry = $ifd->getEntry(PelTag::DATE_TIME_ORIGINAL);
- * $time = $entry->getValue();
- * print('The image was taken on the ' . date('jS', $time));
- * $entry->setValue($time + 7 * 24 * 3600);
- * </code>
- *
- * The example used a standard UNIX timestamp, which is the def...
[truncated message content] |
|
From: <lso...@us...> - 2009-03-01 17:55:10
|
Revision: 514
http://pel.svn.sourceforge.net/pel/?rev=514&view=rev
Author: lsolesen
Date: 2009-03-01 17:54:26 +0000 (Sun, 01 Mar 2009)
Log Message:
-----------
Fixed package build file.
Modified Paths:
--------------
trunk/build.xml
Modified: trunk/build.xml
===================================================================
--- trunk/build.xml 2008-06-08 10:28:07 UTC (rev 513)
+++ trunk/build.xml 2009-03-01 17:54:26 UTC (rev 514)
@@ -9,13 +9,13 @@
<property name="stability" value="beta" />
<property name="pear.channel" value="public.intraface.dk" />
- <property name="source.dir" value="." />
- <property name="tests.dir" value="./tests" />
<property name="build.dir" value="../build" />
- <property name="reports.phpcs.dir" value="../build/logs" />
+ <property name="source.dir" value="./" />
+ <property name="tests.dir" value="./test/" />
+ <property name="build.dir" value="../build" />
<property name="reports.dir" value="../build/logs" />
<property name="reports.phpunit.dir" value="../../build/logs" />
- <property name="reports.coverage.dir" value="../../build/logs/coverage" />
+ <property name="reports.coverage.dir" value="../../build/coverage" />
<property name="api.dir" value="../build/api" />
<target name="prepare">
@@ -103,15 +103,15 @@
</target>
<target name="phpcs">
- <exec output="${reports.phpcs.dir}/checkstyle.xml" dir="${source.dir}"
+ <exec output="${reports.dir}/checkstyle.xml" dir="${source.dir}/src/"
command="phpcs --report=checkstyle . --standard=PEAR" />
</target>
<target name="php-documentor" depends="export">
- <exec dir="${source.dir}" command="phpdoc -ue on -t ${api.dir} -d ./" passthru="true" />
+ <exec dir="${source.dir}" command="phpdoc -ue on -t ${api.dir} -d ./src/" passthru="true" />
</target>
<target name="test">
-<!-- <exec dir="${tests.dir}" command="" passthru="true" checkreturn="true" /> -->
+ <exec dir="${tests.dir}" command="limb_unit --include=*.php --cover=../src/ --cover-report=../coverage" passthru="true" checkreturn="false" />
</target>
</project>
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <lso...@us...> - 2008-06-08 10:28:02
|
Revision: 513
http://pel.svn.sourceforge.net/pel/?rev=513&view=rev
Author: lsolesen
Date: 2008-06-08 03:28:07 -0700 (Sun, 08 Jun 2008)
Log Message:
-----------
Started a build file so it is easier to make a pear package.
Added Paths:
-----------
trunk/build.xml
Added: trunk/build.xml
===================================================================
--- trunk/build.xml (rev 0)
+++ trunk/build.xml 2008-06-08 10:28:07 UTC (rev 513)
@@ -0,0 +1,117 @@
+<?xml version="1.0" ?>
+<project name="PEL" basedir="." default="build">
+ <taskdef classname="phing.tasks.ext.d51PearPkg2Task" name="d51pearpkg2" />
+ <taskdef classname="phing.tasks.ext.IlibPearDeployerTask" name="peardeploy" />
+ <taskdef classname="phing.tasks.ext.FtpDeployTask" name="ftpdeploy" />
+
+ <property name="package-name" value="${phing.project.name}" />
+ <property name="version" value="0.9.3" />
+ <property name="stability" value="beta" />
+ <property name="pear.channel" value="public.intraface.dk" />
+
+ <property name="source.dir" value="." />
+ <property name="tests.dir" value="./tests" />
+ <property name="build.dir" value="../build" />
+ <property name="reports.phpcs.dir" value="../build/logs" />
+ <property name="reports.dir" value="../build/logs" />
+ <property name="reports.phpunit.dir" value="../../build/logs" />
+ <property name="reports.coverage.dir" value="../../build/logs/coverage" />
+ <property name="api.dir" value="../build/api" />
+
+ <target name="prepare">
+ <delete dir="${build.dir}" />
+ </target>
+
+ <target name="export">
+ <echo msg="Exporting SVN files" />
+ <exec command="svn export ${source.dir} ${build.dir}" />
+
+ <mkdir dir="${build.dir}/package/${package-name}-${version}" />
+ <copy todir="${build.dir}/package/${package-name}-${version}">
+ <filterchain>
+ <replacetokens begintoken="@@" endtoken="@@">
+ <token key="VERSION" value="${version}" />
+ </replacetokens>
+ </filterchain>
+
+ <fileset dir="${build.dir}">
+ <include name="**/**" />
+ </fileset>
+ </copy>
+
+ </target>
+
+ <target name="pear" depends="export">
+ <d51pearpkg2 dir="${build.dir}/package/${package-name}-${version}/" baseinstalldir="PEL/">
+ <name>${package-name}</name>
+ <summary>The PHP Exif Library (PEL) lets you fully manipulate Exif (Exchangeable Image File Format) data.</summary>
+ <channel>${pear.channel}</channel>
+ <description>
+ <!-- Don't exceed this width -->
+ The PHP Exif Library (PEL) lets you fully
+ manipulate Exif (Exchangeable Image File Format)
+ data. This is the data that digital cameras
+ place in their images, such as the date and time,
+ shutter speed, ISO value and so on.
+
+ Using PEL, one can fully modify the Exif data,
+ meaning that it can be both read and written.
+ Completely new Exif data can also be added to
+ images. PEL is written completely in PHP and
+ depends on nothing except a standard installation
+ of PHP, version 5. PEL is hosted on SourceForge.
+ </description>
+
+ <lead user="lsolesen" name="Lars Olesen" email="la...@le..." />
+ <lead user="mgeisler" name="Martin Geisler" email="mge...@mg..." active="false" />
+ <license>GPL License</license>
+
+ <version release="${version}" api="${version}" />
+ <stability release="${stability}" api="${stability}" />
+
+ <dependencies>
+ <php minimum_version="5.2.0" />
+
+ <pear minimum_version="1.6.0"
+ recommended_version="1.6.1" />
+ </dependencies>
+ <notes>
+ * Something
+ </notes>
+ </d51pearpkg2>
+ </target>
+
+ <target name="build" depends="prepare, export, test, phpcs, php-documentor, make-pear-package">
+ </target>
+
+ <target name="make-pear-package" depends="pear">
+ <tar compression="gzip" destfile="${build.dir}/${package-name}-${version}.tgz" basedir="${build.dir}/package" />
+ </target>
+
+ <target name="deploy" depends="pear">
+ <property file="./build.properties" />
+ <peardeploy uri="${pear.channel.uri}" username="${pear.channel.username}" password="${pear.channel.password}">
+ <fileset dir="${build.dir}">
+ <include name="${package-name}-${version}.tgz"/>
+ </fileset>
+ </peardeploy>
+ <ftpdeploy host="${ftp.host}" username="${ftp.user}" password="${ftp.password}" port="21" dir="./public.intraface.dk/docs/${package-name}" mode="binary" clearfirst="false">
+ <fileset dir="${api.dir}">
+ <include name="*/**" />
+ </fileset>
+ </ftpdeploy>
+ </target>
+
+ <target name="phpcs">
+ <exec output="${reports.phpcs.dir}/checkstyle.xml" dir="${source.dir}"
+ command="phpcs --report=checkstyle . --standard=PEAR" />
+ </target>
+
+ <target name="php-documentor" depends="export">
+ <exec dir="${source.dir}" command="phpdoc -ue on -t ${api.dir} -d ./" passthru="true" />
+ </target>
+
+ <target name="test">
+<!-- <exec dir="${tests.dir}" command="" passthru="true" checkreturn="true" /> -->
+ </target>
+</project>
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|