imagecreate
(PHP 3, PHP 4, PHP 5)
imagecreate -- Δημιουργείστε μία νέα palette based εικόνα
Περιγραφή
resource
imagecreate ( int x_size, int y_size )
Η συνάρτηση imagecreate() επιστρέφει έναν image identifier
που αναπαριστά μία κενή εικόνα μεγέθους x_size
και y_size.
Συνιστούμε τη χρήση της imagecreatetruecolor().
ÐáñÜäåéãìá 1.
Δημιουργία μίας νέας GD εικόνας και το output αυτής.
<?php header ("Content-type: image/png"); $im = @imagecreate (50, 100) or die ("Cannot Initialize new GD image stream"); $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); imagepng ($im); ?>
|
|
Ανατρέξτε επίσης στην imagecreatetruecolor().