note 79486 added to function.imagecolorallocatealpha

From: Date: Thu, 29 Nov 2007 15:19:55 +0000
Subject: note 79486 added to function.imagecolorallocatealpha
Groups: php.notes 
Request: Send a blank email to php-notes+get-132666@lists.php.net to get a copy of this message
If you need to calculate the integer representation of a color with an alpha channel, without initialising an image and using the imagecolorallocatealpha function. Then this function might be of some help: <?php function alphaColor($hexColor,$alpha) { return bindec(decbin($alpha).decbin(hexdec($hexColor)); } echo alphaColor("FFFFFF",127); ?> ---- Server IP: 202.79.178.91 Probable Submitter: 84.208.116.232 ---- Manual Page -- http://www.php.net/manual/en/function.imagecolorallocatealpha.php Edit -- https://master.php.net/note/edit/79486 Del: integrated -- https://master.php.net/note/delete/79486/integrated Del: useless -- https://master.php.net/note/delete/79486/useless Del: bad code -- https://master.php.net/note/delete/79486/bad+code Del: spam -- https://master.php.net/note/delete/79486/spam Del: non-english -- https://master.php.net/note/delete/79486/non-english Del: in docs -- https://master.php.net/note/delete/79486/in+docs Del: other reasons-- https://master.php.net/note/delete/79486 Reject -- https://master.php.net/note/reject/79486 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#132666) next »