Use this class to display your images with scale. Its very useful to create your images' thumbnail in your image gallery or shopping cart applications. You use this class by put it directly in your <img> tag like this:
Listing 1: listing-1.html
<!-- display product1.jpg in original size -->
<img src="image.php?filename=product1.jpg">
<!-- display product2.jpg scaled by 0.4 -->
<img src="image.php?filename=product2.jpg&scale=0.4">
<!-- try to display missing.jpg,
if it doesn't exist, display default image -->
<img src="image.php?filename=missing.jpg">
Requirements:
- PHP with GD support enabled.
Features:
- Display image in any scale
- Support JPEG, GIF and PNG images
- Display default image if requested image doesn't exist.
Related Articles
The Downloads