.ico to PowerSDK Icon Engine 1.2 converter

by aBe pAzOs - www.hamoid.com // PowerSDK Icon Engine 1.2 by Ted Patrick

Description: This PHP program reads Windows .ico files and converts them to PowerSDK Icon Engine 1.2 ascii file format. A preview is shown in HTML. Flash shows the icon contained in the ascii string. It also serves as an example for reading .ico files from PHP. In case of multi-icon files it only reads the first one. Send your comments to my email, found at 314bits

Usage: Access www.hamoid.com/ico/?i=http://www.yourserver.com/favicon.ico to convert favicon.ico located in www.yourserver.com to the Flash Icon format. You can also download the messy source and the documentation I used here and make it run in your own web server (Warning: it's not cleaned up, I can't use any more time on this experiment :)

Sample icons

a.ico | b.ico | c.ico | d.ico | e.ico | f.ico | g.ico

Debug Info

Reading a.ico
File Size=3262 bytes
MAIN HEADER
00000000 idReserved=0
00000002 idType=1
00000004 idCount=1
ICON HEADER
00000006 bWidth=32
00000007 bHeight=32
00000008 bColorCount=0
00000009 bReserved=0
0000000A bPlanes=0
0000000C wBitCount=0
0000000E dwBytesInRes=3240
00000012 dwImageOffset=22
BITMAPINFO HEADER
00000016 biSize=40
0000001A biWidth=32
0000001E biHeight=64
00000022 biPlanes=1
00000024 biBitCount=24
00000026 biCompression=0
0000002A biSizeImage=3200
0000002E biXPelsPerMeter=0
00000032 biYPelsPerMeter=0
00000036 biClrUsed=0
0000003A biClrImportant=0
FSIZE 3262 = dwImageOffset 22 + biSize 40 +
XORmaskSize 3072 + ANDmaskSize 128 = 3262

0000003E RGBQUAD=0chars
0000003E XOR=3072chars
00000C3E AND=128chars
FINAL POS=3262

HTML preview

                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
a.ico, processed in 0.512 seconds

Icon Engine Code

Flash Preview

Right click and Zoom In :)

Load favicon.ico from this domain