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

本函数暂无文档,仅有参数列表。

Warning

本函数是实验性的。本函数的行为,包括函数名称以及其它任何关于本函数的文档可能会在没有通知的情况下随 PHP 以后的发布而改变。使用本函数风险自担。

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.

返回值

Returns TRUE on success.

范例

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;

?>