Home :: International :: Manuals :: Howto :: FAQ :: Man Pages :: Email Login

 
 

 

imagecreate

(PHP 3, PHP 4 , PHP 5)

imagecreate -- パレットを使用する新規画像の作成

説明

int imagecreate ( int x_size, int y_size)

imagecreate()は、x_sizey_sizeの空の画像を表わす画像IDを返します。

imagecreatetruecolor()の使用を推奨します。

例 1. 新規にGDイメージストリームを作成し、イメージを出力します。

<?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);
?>

imagedestroy() imagecreatetruecolor()も参照してください。

 
 
 
 
Google
  Web Linuxinfor   
 

Home :: Copyright :: Privacy :: Credits :: Get a free Linuxinfor Email Account

Document on this page is part of "PHP マニュアル". See Index Page for more info about Authorship and Copyright.

1999-2009 Linuxinfor.com. No rights reserved.