PHP Classes

Remove Border From Image: Crop images by removing common color borders

Recommend this page to a friend!
  Info   Screenshots Screenshots   View files View files (3)   DownloadInstall with Composer Download .zip   Reputation   Support forum (2)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2009-04-21 (10 years ago) RSS 2.0 feedStarStarStar 53%Total: 797 All time: 4,219 This week: 535Up
Version License PHP version Categories
removeborderfromimag 1.1Freeware5HTML, PHP 5, Graphics
Description Author

This class can be used to crop images by removing common color borders.

It can load a picture and scan its border pixels to determine how thick is the border.

The sensibility level that is used to determine which pixels are in the border is configurable.

The class can crop the image be keeping on the interior inside the image border.

The resulting cropped image can be displayed in JPEG, PNG or GIF format, saved to a file or embedded in an HTML page.

Innovation Award
PHP Programming Innovation award winner
March 2009

Prize: One copy of the Zend Studio
Sometimes it is necessary to process images in such way that they occupy the least possible size. One way to do that is to remove exceeding border thickness.

This class can do that by cropping the image by eliminating the sides of the image that have approximately the same color around the whole image.

Manuel Lemos
Name: Pawel Antczak <contact>
Classes: 2 packages by
Country: Poland Poland
Age: 38
All time rank: 60516 in Poland Poland
Week rank: 760 Down22 in Poland Poland Down
Innovation award
Innovation award
Nominee: 1x

Winner: 1x


  • example
  Files folder image Files  
File Role Description
Plain text file removeBorderFromImage.php Class main class
Image file img.jpg Output test image
Plain text file index.php Example sample usage

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:4,219
This week:535Up
User Ratings User Comments (2)
 All time