PHP Classes
elePHPant
Icontem

phpThumbnailer: Create image thumbnails on the fly

Recommend this page to a friend!
  Info   View files View files (11)   DownloadInstall with Composer Download .zip   Reputation   Support forum (6)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2005-12-27 (10 years ago) RSS 2.0 feedStarStarStarStar 71%Total: 4,060 This week: 2All time: 734 This week: 591Up
Version License Categories
phpthumbnailer 1.0.0GNU General Publi...Graphics
Description Author

This class can be used to create thumbnail images on the fly.

It can resize input images so the rescaled images do not exceed given width and height limits.

It supports resizing images in the GIF, JPEG and PNG formats.

The resized images can be served as the current PHP script output or saved of a new file.

Picture of Hidayet Dogan
Name: Hidayet Dogan <contact>
Classes: 1 package by
Country: Turkey Turkey

Details
By Hidayet Dogan - http://www.hido.net - March 29, 2005

phpThumbnailer 1.2 - 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);
			#      |          |  |   |
			#      |          |  |   +-- Percent (optional)
		        #      |          |  +-- Maximum height (optional)
		        #      |          +-- Maximum width (optional)
			#      +-- Original image filename

  # To show
  $tn_image->show();

  # To show (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.

Sorry for my stupid english.

Disclaimer
----------
No responsiblity for any security risks or software bugs whatsoever is
accepted by the author(s).
  Files folder image Files  
File Role Description
Files folder imagesample (7 files)
Accessible without login Plain text file ChangeLog Doc. ChangeLog
Plain text file class.Thumbnail.php Class Source Code
Accessible without login Plain text file LICENSE Lic. LICENSE
Accessible without login Plain text file README Doc. README

  Files folder image Files  /  sample  
File Role Description
  Accessible without login HTML file sample.html Data Sample Usage
  Accessible without login Image file sample.jpg Data Sample JPEG File
  Accessible without login Plain text file sample1.php Example Sample Script
  Accessible without login Plain text file sample2.php Example Sample Script
  Accessible without login Plain text file sample3.php Example Sample Script
  Accessible without login Plain text file sample4.php Example Sample Script
  Accessible without login Plain text file save1.php Example Sample Script

 Version Control Unique User Downloads Download Rankings  
 0%
Total:4,060
This week:2
All time:734
This week:591Up
 User Ratings  
 
 All time
Utility:88%StarStarStarStarStar
Consistency:91%StarStarStarStarStar
Documentation:91%StarStarStarStarStar
Examples:93%StarStarStarStarStar
Tests:-
Videos:-
Overall:71%StarStarStarStar
Rank:240