Convert Image JPG to GIF and print it into the tag IMG in BASE64

Lamiawamepave

New Member
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 ?\[code\]<?php$src = http://stackoverflow.com/questions/3653755/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 = "http://stackoverflow.com/questions/3653755/data:image/gif;base64," . base64_encode( file_get_contents( "filename.gif" ) );?><img src="http://stackoverflow.com/questions/3653755/<?php echo $data; ?>" width="300" height="300" />\[/code\]
 
Back
Top