
Matthieu Codron - 2013-04-29 09:55:22
while ico files are encoded in little-endian (cf. http://en.wikipedia.org/wiki/ICO_%28file_format%29#Outline), your script does not force unpack to read values as little endian (you are machine endianness dependent).
For example, in \floIconImage::readImageFromICO, you should use
$this->_entry = unpack("CWidth/CHeight/CColorCount/CReserved/vPlanes/vBitCount/VSizeInBytes/VFileOffset", $this->_entryIconFormat);
and
$this->_header = unpack("VSize/VWidth/VHeight/vPlanes/vBitCount/VCompression/VImageSize/VXpixelsPerM/VYpixelsPerM/VColorsUsed/VColorsImportant", $this->_headerIconFormat);
I did not check all your code against this issue