Forum und email

Imagick::newImage

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

Imagick::newImage — Creates a new image

Descrizione

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

Questa funzione, al momento non è documentata; è disponibile soltanto la lista degli argomenti.

Avviso

Questa funzione è SPERIMENTALE. Ovvero, il comportamento di questa funzione, il nome di questa funzione, in definitiva tutto ciò che è documentato qui può cambiare nei futuri rilasci del PHP senza preavviso. Siete avvisati, l'uso di questa funzione è a vostro rischio.

Creates a new image and associates ImagickPixel value as background color

Elenco dei parametri

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.

Valori restituiti

Restituisce TRUE in caso di successo.

Esempi

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;

?>