<?php Header("Content-Type: image/gif"); $im = ImageCreate(230, 200); $red = ImageColorAllocate($im, 255, 0, 0); $black = ImageColorAllocate($im, 0, 0, 0); $green = ImageColorAllocate($im, 0, 255, 0); $white = ImageColorAllocate($im, 255, 255, 255); $blue = ImageColorAllocate($im, 0, 0, 255); ImageFill($im, 0, 0, $white); ImageArc($im, 50,50, 40,40, 0, 660, $red); ImageArc($im, 100,150, 50,50, 0, 360, $blue); ImageArc($im, 100,150, 120,60, 0, 360, $green); //draw a pie chart ImageArc($im, 150,50, 100,100, 0, 360, $red); ImageLine($im, 150,50,200,50,$black); ImageLine($im, 150,50,125,7,$black); ImageLine($im, 150,50,125,93,$black); ImageFill($im, 150,40,$green); ImageFill($im, 150,80,$blue); ImageFill($im, 120,50,$red); ImageGIF($im); ?> <?php Header("Content-Type: image/gif"); $im = ImageCreate(230, 200); $red = ImageColorAllocate($im, 255, 0, 0); $black = ImageColorAllocate($im, 0, 0, 0); $green = ImageColorAllocate($im, 0, 255, 0); $white = ImageColorAllocate($im, 255, 255, 255); $blue = ImageColorAllocate($im, 0, 0, 255); // fill with white ImageFill($im, 0, 0, $white); $thepoints = Array(20, 107, 70, 20, 170, 20, 220, 107, 170, 194, 70, 194); // draw pentagon ImagePolygon($im, $thepoints, 6, $blue); // fill pentagon with green until it reaches blue border ImageFillToBorder($im, 70, 100, $blue, $green); ImageArc($im, 50,50, 40,40, 0, 660, $red); ImageRectangle($im, 70,47,170,167, $red); ImageFilledRectangle($im, 90,67,150,147, $blue); ImageGIF($im); ?> <?php Header("Content-Type: image/gif"); $im = ImageCreate(230, 200); $red = ImageColorAllocate($im, 255, 0, 0); $black = ImageColorAllocate($im, 0, 0, 0); ImageFill($im, 0, 0, $red); $mytext = "WRITE ON THE IMAGE"; $itswide = ImageFontWidth(5); $itshigh = ImageFontHeight(5); $howlong = $itswide * (strlen($mytext)); ImageString($im, 5, 30, 100, $mytext, $black); ImageLine($im, 30, 100 + $itshigh, (30 + $howlong), 100 + $itshigh, $black); ImageGIF($im); ?> <?php Header("Content-Type: image/gif"); $im = ImageCreate(230, 200); $red = ImageColorAllocate($im, 255, 0, 0); $black = ImageColorAllocate($im, 0, 0, 0); ImageFill($im, 0, 0, $red); $mytext = "WRITE ON THE IMAGE"; $itswide = ImageFontWidth(5); $itshigh = ImageFontHeight(5); $howlong = $itswide * (strlen($mytext)); ImageStringUp($im, 5, 110, 180, "WRITE ON THE IMAGE", $black); ImageLine($im, 110 + $itshigh, 180,110 + $itshigh, 180 - $howlong, $black); ImageGIF($im); ?> <?php Header("Content-Type: image/gif"); $im = ImageCreate(230, 200); $red = ImageColorAllocate($im, 255, 0, 0); $black = ImageColorAllocate($im, 0, 0, 0); ImageFill($im, 0, 0, $red); $pts = ImageTTFText($im, 48, 45, 40, 190, $black,"PALSCRI.TTF", "Can you see me?" ); ImageLine($im, $pts[0], $pts[1], $pts[2], $pts[3], $black); ImageGIF($im); ?> <?php Header("Content-Type: image/gif"); $im = ImageCreate(230, 200); $red = ImageColorAllocate($im, 255, 0, 0); $black = ImageColorAllocate($im, 0, 0, 0); ImageFill($im, 0, 0, $red); // write string at (30,100) in black ImageString($im, 5, 30, 100, "WRITE ON THE IMAGE", $black); ImageGIF($im); ?>