Login   Register  
PHP Classes
elePHPant
Icontem

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

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  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 (5 years ago) RSS 2.0 feedStarStarStar 53%Total: 747 All time: 4,102 This week: 1,456Up
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
Winner


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
Picture of Pawel Antczak
Name: Pawel Antczak <contact>
Classes: 2 packages by
Country: Poland Poland
Age: 33
All time rank: 60316 in Poland Poland
Week rank: 744 Down22 in Poland Poland Down
Innovation award
Innovation award
Nominee: 1x

Winner: 1x

Screenshots  
  • 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  
 0%Total:747All time:4,102
 This week:0This week:1,456Up
User Ratings User Comments (2)  
 All time
Utility:75%StarStarStarStar
Consistency:83%StarStarStarStarStar
Documentation:-
Examples:75%StarStarStarStar
Tests:-
Videos:-
Overall:53%StarStarStar
Rank:1383