PHP Classes

Ico: Extract graphics from .ico files into PNG images

Recommend this page to a friend!
  Info   Screenshots Screenshots   View files View files (5)   DownloadInstall with Composer Download .zip   Reputation   Support forum (4)   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStarStar 71%Total: 1,856 This week: 1All time: 2,126 This week: 560Up
Version License Categories
ico 1.0.0GNU General Publi...Graphics, Files and Folders
Description 

Author

This class can extract graphics from .ico files and build a PNG images from them.

It can parse the .ico file header and retrieve the information about how many icons there are in the file, their size, color depth and palette

It can extract each icon image into a new image that can be saved in the PNG format. The extracted image can use a configurable background color.

Innovation Award
PHP Programming Innovation award nominee
June 2005
Number 3
Ico is the name of the format of the files used on Windows operating systems to store the icons used by many types of Windows applications.

This kind of file is also used to represent icon images of Web sites, for instance in bookmark lists. Therefore it is supported by many types of browsers, including those that run on non-Windows operating systems.

An icon file may contain several alternative versions of the same icon image in different sizes and color depths.

This class provides means to extract the different versions of the icon images inside an Ico file. Graphic applications may use each of the images depending on the size and color requirements of such applications.

Manuel Lemos
Picture of Diogo Resende
Name: Diogo Resende <contact>
Classes: 10 packages by
Country: Portugal Portugal
Age: 41
All time rank: 292 in Portugal Portugal
Week rank: 411 Down3 in Portugal Portugal Down
Innovation award
Innovation award
Nominee: 4x

Winner: 2x

Details

I used a remote icon because phpclasses wouldn't let me upload the file. It gets slow when you run the tests so please download the ico and change the test scripts or use your icons ;) There's no documentation, the classes are simple. Open the source and look to the comments.

Screenshots  
  • test2.png
  Files folder image Files  
File Role Description
Accessible without login Plain text file class.ico.php Class Main class
Plain text file class.icothumb.php Class Auxiliary Class for test2.php
Plain text file README.txt Doc. Readme
Plain text file test.php Example Example 1
Plain text file test2.php Example Example 2

 Version Control Unique User Downloads Download Rankings  
 0%
Total:1,856
This week:1
All time:2,126
This week:560Up
User Ratings User Comments (1)
 All time
Utility:89%StarStarStarStarStar
Consistency:92%StarStarStarStarStar
Documentation:75%StarStarStarStar
Examples:96%StarStarStarStarStar
Tests:-
Videos:-
Overall:71%StarStarStarStar
Rank:232