Forum und email

Imagick::newImage

(No version information available, might be only in CVS)

Imagick::newImage — Creates a new image

설명

bool Imagick::newImage ( int $cols , int $rows , ImagickPixel $background [, string $format ] )
Warning

This function is currently not documented; only the argument list is available.

Warning

This function is EXPERIMENTAL. The behaviour of this function, the name of this function, and anything else documented about this function may change without notice in a future release of PHP. Use this function at your own risk.

Creates a new image and associates ImagickPixel value as background color

매개변수

cols

Columns in the new image

rows

Rows in the new image

background

The background color used for this image

format

Image format. This parameter was added in Imagick version 2.0.1.

반환값

성공시에 TRUE를 반환합니다.

예제

Example#1 Using Imagick::newImage():

Create a new image and display it.

<?php

$image 
= new Imagick();
$image->newImage(100100, new ImagickPixel('red'));
$image->setImageFormat('png');

header('Content-type: image/png');
echo 
$image;

?>