Description:
Very useful for creating multiple sizes of image urls from single images
Creates a thumbnailed image based on info passed to it via get.
Images are cached on the server, so server processing overhead is only
needed for the first time the script runs on a particular image.
Usage:
<img src="thumb.php?file=FILE&size=SIZE"> - to size the thumbnail to fit a square
<img src="thumb.php?file=FILE&sizex=SIZEX&sizey=SIZEY"> - to size the thumbnail to fit a rectangle
<img src="thumb.php?file=FILE&size=SIZE&quality=QUALITY&nocache=NOCACHE"> - to set a thumbnails quality
Where:
- FILE = the file to retrieve
- SIZE = the maximum size of the thumbnail in pixels
- SIZEX = the maximum width of the thumbnail (height adjusted accordingly)
- SIZEY = the maximum height of the thumbnail (width adjusted accordingly)
- QUALITY = an integer from 0-100 specifying the resulting jpeg quality of the image
- NOCACHE = an integer 1 or 0. If set to 1, the cached thumbnail is deleted and recreated (use if the source image changes)
Features:
- Server caching of images
- Creation of jpeg thumbnails inline, on the fly
- Can be used for non-local images, if allow_fopen_url in the php configuration is set to true
Requires:
GD Library
Installation:
The script should work with GD versions 1 and 2, and Linux and Windows servers
Licensed under the GNU Lesser General Public License as published by the Free Software Foundation.
Copyright © 2005 Chris Tomlinson.
Download:
Version Changes:
Changes:
0.1 - first release
0.2 - converted cache thumbnail from png to jpeg
0.3 - fixed error where files weren't being cached properly
0.4 - allowed non local urls (if allow_url_fopen is on), quality and nocache switches
0.5 - allowed maximum x and y settings (for scaling images to fit non square sizes)
0.6 - allowed tagging of images (with the get query placing the text in the bottom left hand corner of the image)
0.7 - fixed gd_info error for php<4.3
0.8 - added gif support (for gd 2.0.28)
0.9 - now supports native outputting of png, jpg and gif formats
1.0 - doesn't fail if the cache file can't be created
1.1 - removed a few more notices
Thank you very much for this script and it's very easy to config too.
5:35pm 15 Apr 08
Hi. Excelent script, i made some changes because the size prameter for square images didn't work, so if you want the new version let me know. Ricardo from Dominican Republic.
8:11pm 26 Mar 08
Fantastic script and its quality, Easy to use.
9:45am 9 Feb 08
why is tif not supported?
11:24am 14 Jan 08
why do you not support .tif files?
11:23am 14 Jan 08
Coool script..thanks alot...it helped meh alot..thanks soo much..keep up the good work..
3:39pm 26 Dec 07
I can Give width .. it is now working thumb.php?file=./uploads/cc_articles/59&size=200&quality=100&nocache=NOCACHE
6:44pm 2 Dec 07
Great script! I made a small modification to send back a "304 Not Modified" header to make use of client-side caching. It definitely sped things up for me! Thanks! chris
8:12pm 3 Sep 07
Many many thnx for this amazing script. Very easy to use, very good quality script
6:30pm 29 Aug 07
Thank you very much for the script
9:22pm 15 Feb 07