Jump to content

[SOLVED] php image output problem


Asperon

Recommended Posts

ok so I got my gd2 to be recognized, thank you everyone for that, so i started writing some image work and it doesn't output as an image...it outputs as encrypted data. here is some code I used from the php.net site

 

header ("Content-type: image/png");
$im = @imagecreatetruecolor(120, 20)
      or die("Cannot Initialize new GD image stream");
$text_color = imagecolorallocate($im, 233, 14, 91);
imagestring($im, 1, 5, 5,  "A Simple Text String", $text_color);
imagepng($im);
imagedestroy($im);

 

 

this is what it gave me

 

‰PNG IHDRxÉ0n¤æIDATxœí”Ià EiÕ5ÛŽóåpl{‚."YVüm‚:Hÿ-Á38.…B!äÜìQ¯­”ò|mÐ`—j…^›§|Ê3Œrˆè:‡œ‡ ç+šGr:”Îù_«hZÑõ*&¸_´ïµé·Ù÷²jil{6Þè5ãÇóà²ÒO%Ž<_Vä• «œiFèºÍä ¯ÕK¾åÄE?ì‘ 2hs:¡`ÜçGaFÙÓ9˧^=[Ù/;Ãm»Ãk 8mW&Ç+ ”ij%(s(ˆõ~+›E¬Ð„B!äßy¤Í`^šûIEND®B`‚

Link to comment
https://forums.phpfreaks.com/topic/65144-solved-php-image-output-problem/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.