im having a problem with resizing gifs. When i resize a gif file it resizes and makes the new file ok but the image is black.
<?php
$new_width = 300;
$new_height = 250;
$imgname = "test.gif";
$size = GetImageSize("$imgname");
$img_in = imagecreatefromgif("test.gif");
$img_out = imagecreate($new_width, $new_height);
ImageCopyResized($img_out, $img_in, 0, 0, 0, 0, $new_width, $new_height, $size[0], $size[1]);
imagegif($img_out, "tempimages/testsmall.gif");
ImageDestroy($img_in);
ImageDestroy($img_out);
?>
<img src=test.gif>
<img src=tempimages/testsmall.gif>
I have GD Library version 2 and it DOES have gif read and create enabled
gd_info(); returns:
["GIF Read Support"]=> bool(true) ["GIF Create Support"]=> bool(true)
So any ideas on how to resize a gif and not have the problem im having or a way to fix my problem would be great,
Cheers