|
Posted by Kimmo Laine on 05/22/06 14:44
"Chamomile" <newsgroups@chamomile.co.uk> wrote in message
news:irGdnfZJqq6TJO3ZnZ2dnUVZ8s6dnZ2d@bt.com...
> Does anyone know if its possible to set imagecreatetruecolor() to
> initialise
> with transparency
> rather than black?
> Maybe a cunning work-around?
>
It's mentioned in the user comments in php.net manual page:
http://fi.php.net/manual/en/function.imagecreatetruecolor.php#54025
// Creates a transparent image rather than the default black image
function imageCreateTransparent($x, $y) {
$imageOut = imagecreate($x, $y);
$colourBlack = imagecolorallocate($imageOut, 0, 0, 0);
imagecolortransparent($imageOut, $colourBlack);
return $imageOut;
}
HTH
--
"ohjelmoija on organismi joka muuttaa kofeiinia koodiksi" -lpk
spam@outolempi.net | Gedoon-S @ IRCnet | rot13(xvzzb@bhgbyrzcv.arg)
Navigation:
[Reply to this message]
|