This is my current code... Give it a try and you will see what I mean:
<?php
$c_width = 350; // canvas width
$c_height = 125; // canvas height
$img = ImageCreate($c_width, $c_height); //create the raw image
// create colors
$black = ImageColorAllocate($img, 0, 0, 0);
$white = ImageColorAllocate($img, 255, 255, 255);
ImageFilledRectangle($img, 0, 0, 350, 125, $white);
// Imagesetpixel($img, 100,100, $white);
$points = array(array(0,100,0,200), array(100,100,200,200));
$pen = explode(",", "32,66,33,67,34,68,36,68,38,69,46,69,49,69,53,68,57,66,65,62,72,55,77,54,79,50,85,44,90,39,92,36,94,34,97,27,97,26,97,25,97,22,96,22,95,22,89,21,85,20,76,20,68,20,66,21,61,23,60,24,58,29,58,31,58,33,58,37,58,43,59,45,61,50,64,55,65,56,69,60,73,61,77,63,102,65,110,65,116,65,123,64,126,61,126,59,126,58,126,57,125,57,124,57,0,0,147,25,140,27,137,29,136,31,136,32,136,34,137,35,138,37,140,39,146,42,157,45,161,47,161,48,159,50,156,53,153,58,153,62,153,64,154,65,155,69,155,72,154,73,0,0,188,23,188,24,190,26,192,27,196,29,206,34,212,37,218,40,224,46,224,49,222,55,218,59,215,61,212,63,204,66,201,68,197,71,195,72,192,75,191,76,191,75,206,66,212,62,227,52,234,49,243,44,247,41,249,40,251,38,252,38,251,38,248,39,239,44,239,45,240,48,245,48,259,45,268,43,282,37,286,35,288,32,289,30,287,30,278,30,263,31,246,34,241,35,232,35,230,36,227,40,226,41,225,44,224,50,224,52,226,58,226,60,229,63,231,65,232,65,234,65,236,65,239,64,246,63,249,63,253,63,256,62,258,62,260,61,265,60,266,60,269,60,271,60,272,60,274,60,275,60,0,0");
for ($x=0; $x<count($pen);$x = $x+4) {
if ($pen[$x] + $pen[$x + 1] != 0 && $pen[$x + 2] + $pen[$x + 3] != 0)
imageline($img, $pen[$x] , $pen[$x + 1], $pen[$x + 2], $pen[$x + 3], $black);
}
// Output the Header and Content.
header("Content-Type: image/png");
ImagePNG($img);
?>
The output is all spotty and not connected