RE: [PHP] problem with ImageCreateJPEG ...

From: Date: Tue, 04 Dec 2001 14:58:20 +0000
Subject: RE: [PHP] problem with ImageCreateJPEG ...
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-76525@lists.php.net to get a copy of this message
also, are you sure both versions of php were compiled the same way with the same options and support? -----Original Message----- From: Johan Holst Nielsen [mailto:johan@1way2print.net] Sent: Tuesday, December 04, 2001 9:22 AM To: Miguel Loureiro; php-general@lists.php.net Subject: Re: [PHP] problem with ImageCreateJPEG ... > > >sorry for taking your time, but I still dont understand why I got errors with >pjeg... >I use the following code on other machine with jpeg support to , and it works, >while in my machine I got an empty jpeg file ><? > Header("Content-type: image/jpeg"); > $im=ImageCreate(400,200); > $bcg = ImageColorAllocate($im,240,240,240); > $prt = ImageColorAllocate($im,0,0,0); > $rd = ImageColorAllocate($im,255,0,0); > ImageFill($im,400,200,$bcg); > ImageLine($im,110,85,280,85,$rd); > ImageString($im,5,130,90,"--- OK ---",$prt); > ImageLine($im,110,110,280,110,$rd); > ImageJPEG($im,"a.jpg"); >?> ><html> ><body> ><img src="a.jpg"> ></body> ></html> > Try to remove all html, and instead make a ImageJPEG($img); You should then only get the JPEG file? You set a header, and the browser doesn't understand the HTML... regards Johan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#76525) next »