sasori Posted January 23, 2010 Share Posted January 23, 2010 hi, I ran this code [code=php:0] $height = 200; $width = 200; $im = imagecreatetruecolor($width,$height); $white = imagecolorallocate($im,255,255,255); $blue = imagecolorallocate($im,0,0,64); imagefill($im, 0,0,$blue); imageline($im,0,0,$width,$height,$white); imagestring($im,4,50,150,'Sales', $white); Header('Content Type: image/png'); imagepng($im); imagedestroy($im); why am I getting this ouput in browser ? ( i also tried other browsers aside from FF, and its the same stuff) Link to comment https://forums.phpfreaks.com/topic/189515-image-generation-problem/ Share on other sites More sharing options...
Alex Posted January 23, 2010 Share Posted January 23, 2010 You're using the wrong header. It should be: header('Content-type: image/png'); Link to comment https://forums.phpfreaks.com/topic/189515-image-generation-problem/#findComment-1000332 Share on other sites More sharing options...
sasori Posted January 23, 2010 Author Share Posted January 23, 2010 cool, it works now. i missed the "hyphen" Link to comment https://forums.phpfreaks.com/topic/189515-image-generation-problem/#findComment-1000334 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.