Re: ImageCreateFromJpeg() bug?

From: Date: Thu, 13 Jul 2000 19:08:57 +0000
Subject: Re: ImageCreateFromJpeg() bug?
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-6524@lists.php.net to get a copy of this message
In article <NBBBKILNGOGFJHHNNLADCEFHEKAA.goatrider@goatrider.com>, goatrider@goatrider.com ("Benton Jackson") wrote: > It doesn't work anyways. I get this error message: > > <b>Warning</b>: ImageCreateFromGif: Unable to open > http://www.goatrider.com/image.php?id=1&scale=1 for reading > in > <b>/home/httpd/htdocs/goatrider/image.php</b> on line > <b>18</b><br> > > So, ImageCreateFromGif() doesn't seem to be able to read from HTTP. Looks like a bug. ImageCreateFromJPEG doesn't either. <?php if ('yes'!=$text) { header("Content-type: image/jpeg"); } if (!$Image) { $Image = "http://www.hoboes.com/Graphics/Cerebus.jpg"; } if ('create'==$source) { $theImage = ImageCreateFromJPEG($Image); ImageJPEG($theImage); } else { readfile($Image); } ?> http://www.acusd.edu/~jerry/Test/php/htimgae.php3 displays the image fine, using 'readfile($theImage)'. http://www.acusd.edu/~jerry/Test/php/htimage.php3?source=create creates the above error, which you can see using: http://www.acusd.edu/~jerry/Test/php/htimage.php3?source=create&text=yes I've looked at the source; at a cursory glance, it looks as though URLs are supposed to work exactly the same for the ImageCreateFromxxxx functions as it is for the readfile function. They both call the same wrapper. If you're lucky, it might have been fixed in PHP 4. If you're familiar with C, look around gd.c in the functions directory (PHP 3) and fopen-wrappers.c in the top level. Jerry

« previous php.general (#6524) next »