-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathREADME
47 lines (36 loc) · 1.36 KB
/
README
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
By Hidayet Dogan - http://www.hido.net - Sep 28, 2006
phpThumbnailer 1.5 - http://www.hido.net/projects/phpThumbnailer
phpThumbnailer is a simple PHP class for create thumbnails or resize images.
Requirements
------------
GD extension enabled PHP.
Sample Use
----------
<?
include("class.Thumbnail.php");
$tn_image = new Thumbnail("sample.png", 0, 0, 50, 75);
# | | | | |
# | | | | + JPEG Quality (optional)
# | | | +-- Percent (optional)
# | | +-- Maximum height (optional)
# | +-- Maximum width (optional)
# +-- Original image filename
# To show
$tn_image->show();
# To save (it won't show image)
$tn_image->save("tn_sample.png");
# or
$tn_image->show("tn_sample.png");
?>
For more samples see samples/sample.html...
Note
----
Version of GD library older than gd-1.6 support GIF format images, and do not
support PNG images, where versions greather than gd-1.6 support PNG, not GIF.
In order to create thumbnails in JPEG format, you will need to obtain and
install jpeg-6b library, and then recompile gd to make use of jpeg-6b. You
will also have to compile PHP with --with-jpeg-dir=/path/to/jpeg-6b.
Disclaimer
----------
No responsiblity for any security risks or software bugs whatsoever is
accepted by the author(s).