Asperon Posted August 15, 2007 Share Posted August 15, 2007 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`‚ Quote Link to comment https://forums.phpfreaks.com/topic/65144-solved-php-image-output-problem/ Share on other sites More sharing options...
willpower Posted August 15, 2007 Share Posted August 15, 2007 how are you calling this file? i have had a similar problem once. Write another file and add an image tag with the src set as yourfile.php...see what happens then Quote Link to comment https://forums.phpfreaks.com/topic/65144-solved-php-image-output-problem/#findComment-325199 Share on other sites More sharing options...
Asperon Posted August 15, 2007 Author Share Posted August 15, 2007 that worked, thank you very much Quote Link to comment https://forums.phpfreaks.com/topic/65144-solved-php-image-output-problem/#findComment-325211 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.