You are here: Re: setting imagecreatetruecolor() to have transparency as default « PHP Programming Language « IT news, forums, messages
Re: setting imagecreatetruecolor() to have transparency as default

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация