views:

70

answers:

1

Does anyone know how to make a .ico file that will work in Intenet explorer? I can't seem to get anywhere here is my gd code

$im = imagecreatefromjpeg(FAVICONDIR.'normal/'.$filename );
        list($width, $height) = getimagesize(FAVICONDIR.'normal/'.$filename); // get the width and height of the jpg
        $image_p = imagecreatetruecolor("16", "16"); // create a 16x16 canvas to play with
        imagecopyresampled($image_p, $im, 0, 0, 0, 0, "16", "16", $width, $height); // resize jpg to 16x16
        imagepng($image_p,FAVICONDIR.'icons/'.$ico_filename); // make a .png file (icon file) from our data
        imagedestroy ($im); // close gd library

and an attenpt with image magick

/*$cmd = IMAGEMAGIKDIR .''. FAVICONDIR.'normal/'.$filename . ' -transparent white -background white -flatten -resize 16x16   ico:'.FAVICONDIR.'icons/'.$ico_filename;
    exec($cmd);*/

Any ideas would be great. Thanks Richard

A: 

Use png2ico if you run into problems this is a great tutorial http://myutil.com/2007/10/14/favicon-ico-gimp Richard

Richard Housham