note 10899 modified in function.imagefilltoborder by irc-html

From: Date: Wed, 16 Jan 2002 17:05:22 +0000
Subject: note 10899 modified in function.imagefilltoborder by irc-html
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-24930@lists.php.net to get a copy of this message
Great for getting that rounded button look we see a lot of at php.net ... try this sample. (remember to change png to whatever image format your version of php supports) <?php Header ("Content-type: image/png"); ///// create canvas ///// $im = ImageCreate (80, 25); //define colors.. first color declared is set as background $blue = ImageColorAllocate ($im, 0, 0, 255); $white = ImageColorAllocate ($im, 255, 255, 255); // draw semi-circle arcs at each end ImageArc($im, 12, 12, 23, 26, 90, 270, $white); ImageArc($im, 67, 12, 23, 26, 270, 90, $white); // fill ends outside arcs with color ImageFillToBorder ($im, 0, 0, $white, $white); ImageFillToBorder ($im, 79, 0, $white, $white); // create the image ImagePng ($im); // destroy the image to free memory ImageDestroy ($im); ?> --was-- Great for getting that rounded button look we see a lot of at php.net ... try this sample. (remember to change png to whatever image format your version of php supports) <pre> &lt;?php Header ("Content-type: image/png"); ///// create canvas ///// $im = ImageCreate (80, 25); //define colors.. first color declared is set as background $blue = ImageColorAllocate ($im, 0, 0, 255); $white = ImageColorAllocate ($im, 255, 255, 255); // draw semi-circle arcs at each end ImageArc($im, 12, 12, 23, 26, 90, 270, $white); ImageArc($im, 67, 12, 23, 26, 270, 90, $white); // fill ends outside arcs with color ImageFillToBorder ($im, 0, 0, $white, $white); ImageFillToBorder ($im, 79, 0, $white, $white); // create the image ImagePng ($im); // destroy the image to free memory ImageDestroy ($im); ?> </pre> http://www.php.net/manual/en/function.imagefilltoborder.php

« previous php.notes (#24930) next »