This is my actual code, I have troubles related with the right visualization of the gif image generated on the fly for my php script. If I access directly to the gif image generated by the script the browser show it good but if I try from my current script through tag img, the browser couldn't show it.
Any suggest friends ?
<?php
$src = imagecreatefromjpeg( 'img/ejemplo-2.jpg' );
list( $width, $height ) = getimagesize( 'img/ejemplo-2.jpg' );
$tmp = imagecreatetruecolor( '300', '300');
imagecopyresampled( $tmp, $src, 0, 0, 0, 0, '300', '300', $width, $height );
$imagen = imagegif( $tmp, "filename.gif" );
$data = "data:image/gif;base64," . base64_encode( file_get_contents( "filename.gif" ) );
?>
<img src="<?php echo $data; ?>" width="300" height="300" />