PHP Classes

PHP Image Sizer: Resize images to a given width and height

Recommend this page to a friend!
  Info   View files Example   View files View files (6)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStarStar 74%Total: 534 All time: 5,619 This week: 108Up
Version License PHP version Categories
image-sizer 1.0.1GNU General Publi...5.3PHP 5, Graphics


This class can resize images to a given width and height.

It can take a given GIF, JPEG and PNG image and resize it to a given width and height.

The class can display the image as the current script output or save to a given file.

The quality percentage of the resized image is a configurable parameter.

Picture of Mohamed Elbahja
  Performance   Level  
Name: Mohamed Elbahja is available for providing paid consulting. Contact Mohamed Elbahja .
Classes: 12 packages by
Country: Morocco Morocco
Age: 29
All time rank: 9041 in Morocco Morocco
Week rank: 405 Up3 in Morocco Morocco Down
Innovation award
Innovation award
Nominee: 4x


i want to resize image class
want resize exact width and height image which i provided.

Resize image on upload
I want to modify uploaded images to a specific size




$img = new image_sizer();

 * setImage()
 * url : http://localhost/example1.php?img=

 * setSize
 * New image size
 * $img->setSize(Width, Height)
$img->setSize(100, 60);

 * show image
 * $img->show(type, quality);
 * type : png, jpeg, jpg, gif
 * quality : image show quality 100 = 100%
$img->show('png', 100);



resize and save or show png, jpg and gif images using PHP

  Files folder image Files  
File Role Description
Files folder imageexamples (4 files)
Plain text file image_sizer.php Class Class source
Accessible without login Plain text file Doc. Documentation

  Files folder image Files  /  examples  
File Role Description
  Accessible without login Plain text file example1.php Example Example script
  Accessible without login Plain text file example2.php Example Example script
  Accessible without login Plain text file example3.php Example Example script
  Accessible without login Image file php.png Data Auxiliary data

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:5,619
This week:108Up
 User Ratings  
 All time