As of now I am using cURL to load a remote favicon, but it outputs it as a .ICO, which AS3 will not load. I tried to convert the .ICO with imagepng, but that caused errors. Is there a way I can load a remote favicon and convert it to a png with PHP before loading it into AS3 without relying on Google's s2?
Some of the code:
snip
$imagestring = curl_exec($ch);
$image = imagecreatefromstring($image);
curl_close($ch);
header("Content-Type: image/png");
imag开发者_Go百科epng($image);
imagedestroy($image);
snip
GD doesn't support the ICO image format. However, somewhere inside the ICO file should be valid BMP file - once you strip out the ICO format stuff, you should be able to load what's left via imagecreatefromstring().
To help you along the way, you can find more information about the ICO format on this wikipedia page.
精彩评论