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.
Return值
Returns TRUE on success.
範例
Example#1 Using Imagick::newImage():
Create a new image and display it.
<?php
$image = new Imagick();
$image->newImage(100, 100, new ImagickPixel('red'));
$image->setImageFormat('png');
header('Content-type: image/png');
echo $image;
?>