Imagick::newImage
(No version information available, might be only in CVS)
Imagick::newImage — Creates a new image
Description
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
Parameters
- 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 Values
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;
?>