Location: PHPKode > projects > PEL: PHP Exif Library > pel-0.9.1/doc/ric_INSTALL.html
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos -->
			<title></title>
			<link rel="stylesheet" href="media/stylesheet.css" />
			<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
		</head>
		<body>
						<div align="center"><h1>INSTALL</h1></div>
<pre>
INSTALL 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.
Licensed under the GNU GPL, see COPYING for details.


Requirements
************

PEL requires PHP version 5, which was released in July 2004. If your
provider still uses PHP 4, then ask them politely to upgrade.

People using Debian GNU/Linux Etch can easily install PHP 5 from the
normal Debian repository. For Debian Sarge one can use the packages
found at http://people.debian.org/~dexter/dists/all/ or those at
http://dotdeb.org/.

Binaries for Windows are available from http://php.net/, where one
also finds the source code for those who want to build PHP 5
themselves.


Installation
************

PEL is installed by downloading it and unpacking it in a directory of
your choice.  Your application can then start using the classed
defined in PEL, most likely the PelJpeg class which contain an entire
JPEG image or the PelTiff class for working with TIFF images.

It is important to understand that PEL is a library and not an
application with a pretty interface --- PEL is a collection of classes
that can be used to parse, read, and write Exif headers.


Upgrading
*********

If you have already been using a previous version of PEL, then be sure
to read the NEWS file before starting with a new version.  The goal of
the NEWS file is to list the important changes in a more concise way
that the ChangeLog file (which lists *every* little change).


Using PEL
*********

Your application should include PelJpeg.php or PelTiff.php for working
with JPEG or TIFF files.  The files will define the PelJpeg and
PelTiff classes, which can hold a JPEG or TIFF image, respectively.
Please see the API documentation in the doc directory or online at

  http://pel.sourceforge.net/doc/

for the full story about those classes and all other available classes
in PEL.

Still, an example would be good.  The following example will load a
JPEG file given as a command line argument, parse the Exif data
within, change the image description to 'Edited by PEL', and finally
save the file again.  All in just six lines of code:

  &lt;?php
  require_once('PelJpeg.php');
  
  $jpeg = new PelJpeg($argv[1]);
  
  $ifd0 = $jpeg-&gt;getExif()-&gt;getTiff()-&gt;getIfd();
  $entry = $ifd0-&gt;getEntry(PelTag::IMAGE_DESCRIPTION);
  $entry-&gt;setValue('Edited by PEL');
  file_put_contents($argv[1], $jpeg-&gt;getBytes());
  ?&gt;

See the examples directory for this example (or rather a more
elaborate version in the file edit-description.php) and others as PHP
files.  You may have to adjust the path to PHP, found in the very
first line of the files before you can execute them.


Changing PEL
************

If you find a bug in PEL then please send a report back so that it can
be fixed in the next version.  You can submit your bugs and other
requests here:

  http://sourceforge.net/tracker/?group_id=108380

If you change the code (to fix bugs or to implement enhancements), it
is highly recommended that you test your changes against known good
data.  Please see the test/README file for more information about
running the PEL test suite.

</pre>
	<p class="notes" id="credit">
		Documentation generated on Tue, 19 Dec 2006 01:08:11 +0100 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.0</a>
                <a target="_top" href="http://sourceforge.net/"><img src="http://sourceforge.net/sflogo.php?group_id=108380&amp;type=1" width="88" height="31" border="0" align="right" alt="SourceForge.net Logo" /></a>
	</p>
	</body>
</html>
Return current item: PEL: PHP Exif Library