Icon2Png
bluepalmtrees.com

» About Icon2Png

Icon2Png is a PHP class to convert icons to PNG images. This class loads an icon and can report information on all formats in the icon resource. The PNG can be output directly to the browser as an image or saved on the server. Supports 1-bit, 4-bit, 8-bit, 24-bit, and 32-bit icon image depths (including PNG compression) with indexed and true transparency.

icon($icon_filename) - class constructor
int TotalIcons() - the number of images available
array GetIconInfo([int $index]) - meta data for icon at $index
bool SaveIcon($filename[, int $index]) - saves the icon at $index to $filename
bool ShowIcon([int $index]) - Show the icon at $index in the browser
int Find($width[, $depth]) - Returns the icon index matching $width and $depth (32-bit)
int FindMax($width[, $depth]) - Finds the largest icon without exceeding $width, $depth

» Screenshots

Screenshots: One

» Downloads
 
(15 Jul 2010 - 1.88 KB)
Now able to work with icons at any size, not just powers of 2
Improved performance
Help from Gavin at maurent.com
 
(31 Mar 2009 - 2.00 KB)
Added support for all PNG compressed icons, not just 256x256
Added 2 methods for finding an icon
Performance enhancements
 
(30 Aug 2008 - 2.05 KB)
Initial release
 

149 total downloads