note 10899 deleted from function.imagefilltoborder by cmb

From: Date: Sun, 04 Aug 2019 12:21:14 +0000
Subject: note 10899 deleted from function.imagefilltoborder by cmb
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-211816@lists.php.net to get a copy of this message
Note Submitter: ecofarm at mullum dot com dot au ---- 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); ?>

« previous php.notes (#211816) next »