PHP imagecolordeallocate - zuweisen Farbe für ein Bild
imagecolordeallocate - nicht zugeordnete Farbe des Bildes.
Grammatik
bool imagecolordeallocate ( resource $image , int $color )
imagecolordeallocate () Funktion bisherigen abbrechen imagecolorallocate () oder imagecolorallocatealpha () zugeordnete Farbe.
Beispiele
<?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); ?>
Das obige Beispiel des Ausgangsbildes ist wie folgt:
In Verbindung stehende Artikel
- imagecolorallocate () eine Farbe auf ein Bild zuweisen.
- imagecolorallocatealpha () eine Farbe und Transparenz eines Bildes zuordnen.