Jump to content

simple graphics


twiztedazn

Recommended Posts

hey i have a problem, i'm tryin to learn a bit about simple graphics, and i've made a program to print out a circle, but then i view it in the browser, the image doesen't appear

[code]
<?php
Header("Content-type: image/png");
$im = @imagecreate(300, 200);
$cx = round(ImageSX($im) / 2);
$cy = round(ImageSY($im) / 2);
$bgcolor = ImageColorAllocate ($im, 0xBF, 0xBF, 0xBF)
//head
$head_col= imagecolorallocate($im, 225, 225, 225);
ImageFilledEllipse($im, $cx, $cy, 150, 150, $head_col);
imagepng($im);
ImageDestroy($im);
?>
[/code]

and this is the html file that shows the png img

[code]
<html>
      <body>
      <img src=man.php>
      </body>
</html>
[/code]

i've looked over it, but i'm not sure what i did wrong....
Link to comment
https://forums.phpfreaks.com/topic/32197-simple-graphics/
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.