Re: Reading & Displaying Latex Rendered images [message #178557 is a reply to message #178556] |
Mon, 02 July 2012 07:34 |
alvaro.NOSPAMTHANX
Messages: 277 Registered: September 2010
Karma:
|
Senior Member |
|
|
El 02/07/2012 8:42, Fastian escribió/wrote:
> <?
> $image = file_get_contents('users.gif');
>
> header('Content-Type: image/gif');
>
> //imagegif($image); // I also tried to display image with imagegif but it also didnt work.
The imagegif() function [1] expects «An image resource, returned by one
of the image creation functions, such as imagecreatetruecolor()». I
don't know how you reached the conclusion that you need such functions,
given that are not even using PHP to generate the image :-?
Probably, readfile() is all you need.
[1] http://php.net/imagegif
[1] http://php.net/readfile
> But the image is NOT displayed on the browser.Where I am wrong?
Browsers are basically designed to ignore invalid stuff and your
"testing.php" script is possibly printing an error message rather than a
valid GIF file. I suggest you remove the last layer and debug
"testing.php" directly.
--
-- http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programación web: http://borrame.com
-- Mi web de humor satinado: http://www.demogracia.com
--
|
|
|