-
Notifications
You must be signed in to change notification settings - Fork 0
/
INSTALL
82 lines (55 loc) · 2.39 KB
/
INSTALL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
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, 2007 Martin Geisler.
Licensed under the GNU GPL, see COPYING for details.
Requirements
************
PEL requires PHP version 5.
Installation
************
The preferred way of installing PEL is using the pear installer:
pear channel-discover pearhub.org
pear install pearhub/pel
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).
You can use the pear installer to upgrade:
pear upgrade pearhub/pel
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://lsolesen.github.com/pel/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:
<?php
require_once('PelJpeg.php');
$jpeg = new PelJpeg($argv[1]);
$ifd0 = $jpeg->getExif()->getTiff()->getIfd();
$entry = $ifd0->getEntry(PelTag::IMAGE_DESCRIPTION);
$entry->setValue('Edited by PEL');
$jpeg->saveFile($argv[1]);
?>
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://github.com/lsolesen/pel/issues
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.