I am writing a WordPress plugin to download favicons and also convert them to png :
- I needed to have an ICO to PNG conversion Library that does not read files from disk but from strings.
- I also need broad support for users so not a compiled php with a parameter that not most of the general WordPress users have
- I am currently using this one: http://www.phpclasses.org/package/2369-PHP-Extract-graphics-from-ico-files-into-PNG-images.html
In 1 out of 5.000 icons (the others work ok…) a problem occurs with the XOR functionality. See line 296 here: http://plugins.trac.wordpress.org/browser/wp-favicons/trunk/plugins/filters/inc/class.ico.php (Notice: Uninitialized string offset: 64) So the string expected is too small.
An example is this icon: (taken from slatch.com)
Does anybody know how to fix this? OR knows another good PHP Icon Class that lets me read .ico (all sorts of) via get_as_string instead of get_from_file which is better?
I already read: