GD and Image 함수 목록
PHP Manual

imagecreatetruecolor

(PHP 4 >= 4.0.6, PHP 5, PHP 7)

imagecreatetruecolorCreate a new true color image

설명

resource imagecreatetruecolor ( int $width , int $height )

imagecreatetruecolor() returns an image identifier representing a black image of the specified size.

인수

width

Image width.

height

Image height.

반환값

성공 시에 이미지 자원 지시자를, 오류 시에 FALSE를 반환합니다.

예제

Example #1 Creating a new GD image stream and outputting an image.

<?php
header 
('Content-Type: image/png');
$im = @imagecreatetruecolor(12020)
      or die(
'Cannot Initialize new GD image stream');
$text_color imagecolorallocate($im2331491);
imagestring($im155,  'A Simple Text String'$text_color);
imagepng($im);
imagedestroy($im);
?>

위 예제의 출력 예시:

Output of example : Creating a new GD image stream and outputting an image.

참고


GD and Image 함수 목록
PHP Manual