English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
imagecolordeallocate — إلغاء تخصيص لون الصورة.
bool imagecolordeallocate ( resource $image , int $color )
يتم إلغاء تخصيص colordeallocate() للإزالة السابقة من imagecolorallocate() أو imagecolorallocatealpha() الألوان المخصصة.
<?php header("Content-type: image/png"); $im = @imagecreate(100, 50) or die("لا يمكن بدء تيار الصورة GD الجديدة"); $background_color = imagecolorallocate($im, 255, 255, 255); $text_color = imagecolorallocate($im, 233, 14, 91); imagestring($im, 1, 5, 5, "A Simple Text String", $text_color); imagecolordeallocate($im, $background_color); imagepng($im); imagedestroy($im); ?>
صورة النتيجة الخروج للعينة أعلاه:
imagecolorallocate() تخصيص الألوان للصورة.
imagecolorallocatealpha() تخصيص الألوان والشفافية للصورة.