Hi All:
I've got a table on a MySQL database with a LongBlob field. This field store an image, the image it is stored within a program written in C#. After that, i must render this image (gif image) in a web page, of course with PHP, this image is an "animation" (GIF89a). My code to render is:

$res = mysqli_query($link, "SELECT image FROM images");

if($row = mysqli_fetch_array($res))
{
    if($row['image'] != null)
    {
    	ob_clean();
    	header("Content-type: image/gif");
		$im = imagecreatefromstring($row["image"]);
		imagegif($im);
		ob_flush();
		flush();
		imagedestroy($im);
     }
}

This code works, but it only display the first FRAME of my Animated Gif. How do i do to display the animated gif with all the frames and the animation? I think that is something with GIF89a and GIF87, but i googled a lot and i cannot find anything-

Thanks a lot in advance.

    Perhaps leave the image functions out of the whole process, and instead just echo $row['image']?

      Ups. I can't belive it 🙂 I was trying other things for a week 🙂

        Sometimes we tend to over-think things. 😉

          Write a Reply...