= $imagewidth){$ybgr=$ybgr + 4;} if ($xbgr >= $imagewidth){$xbgr = 0;} $background++; } $i = 0; while($i<=$break){ if ($i==$break){break;} $r = rand(1, 255); $g = rand(1, 255); $b = rand(1, 255); if ($monotone == 1){ $r = $tone - (rand(-$tonedepth,$tonedepth)); $g = $tone - (rand(-$tonedepth,$tonedepth)); $b = $tone - (rand(-$tonedepth,$tonedepth));} $color1 = ImageColorAllocate ($image, $r, $g, $b); $colorshiftr = rand(-$colorshiftamt, $colorshiftamt); $colorshiftg = rand(-$colorshiftamt, $colorshiftamt); $colorshiftb = rand(-$colorshiftamt, $colorshiftamt); $color2 = ImageColorAllocate ($image, $r+$colorshiftr, $g+$colorshiftg, $b+$colorshiftb); $width = rand($minboxwidth,$maxboxwidth); if ($randomheight == 1){$height = (rand($minheighthalf, $maxheighthalf)*2);} $endx = $startx+$width; $endy = $starty+$height; $subloop = 0; $inc = 0; $down = 2; $down2 =1; while($subloop<=$breaksub){ if ($subloop==$breaksub){break;} imageline ( $image, $startx + $inc, $starty + $down, $startx + $width + $inc, $starty + $down, $color1); imageline ( $image, $startx + $inc, $starty + $down2, $startx + $width + $inc, $starty + $down2, $color2); imageline ( $image, $startx, $starty + 1, $startx, $starty + (25*2), $black); $down = $down + 2; $down2 =$down2 + 2; $subloop++; } $i++; $startx = $startx + $width + $offset; //$starty = $starty + rand(-1,1); } //OUTPUT JPEG header('Content-Type: image/png'); ImagePNG($image); ?>