Problem with ICO to PNG PHP library

Context: Favicons

I am writing a WordPress plugin to download favicons and also convert them to png :

http://plugins.trac.wordpress.org/browser/wp-favicons/trunk ( GPL2)

Icon Lib

Problem

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.

Example

An example is this icon: (taken from slatch.com)

Question

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?

PS

I already read:

This entry was posted in Uncategorized and tagged , , , . Bookmark the permalink.

3 Responses to Problem with ICO to PNG PHP library

  1. Unsigned Code Labs says:

    The example icon you posted is monochrome (1 BPP). Its possible the library does not support such a low color depth.

  2. Unsigned says:

    The example icon you posted is monochrome (1 BPP). Its possible the library does not support such a low color depth.

  3. RichardW11 says:

    The example icon you posted is monochrome (1 BPP). Its possible the library does not support such a low color depth.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>