CakeFest 2017 NYC, the Official CakePHP Conference


(PECL imagick 2.0.0)

Imagick::setImageBackgroundColorSets the image background color


bool Imagick::setImageBackgroundColor ( mixed $background )

Sets the image background color.

Elenco dei parametri


Valori restituiti

Restituisce TRUE in caso di successo.


Lancia una ImagickException in caso di errore.

Log delle modifiche

Versione Descrizione
2.1.0 Now allows a string representing the color as the parameter. Previous versions allow only an ImagickPixel object.

add a note add a note

User Contributed Notes 1 note

Matthias Zartmann
2 years ago
Small example to optimize a gray scanned image:
= new Imagick();
//deskew the image
//Crop to A4 and scanner pageoffset 50
$im->cropImage(2480, 3416, 50, 0);
//Need a Monochrome Image
//Compressen tiff CCITT Group 4
To Top