Overview
KB
Technical FAQ
PHP Manual
CSS2 Manual
HTML Manual
JS Guide
JS Reference
PhpDock Manual
Nu-Coder Manual
PhpExpress Manual
PHP Joomla
Development
Learn PHP
 
<Imagick::setBackgroundColorImagick::setCompression>
^ImagickLast updated: Mon, 26 Oct 2026

Imagick::setColorspace

(PECL imagick 3)

Imagick::setColorspace — Set colorspace

Description

public function Imagick::setColorspace(int $COLORSPACE): bool

Sets the global colorspace value for the object. This method is available if Imagick has been compiled against ImageMagick version 6.5.7 or newer.

Parameters

COLORSPACE

One of the COLORSPACE constants

Return Values

Returns true on success.

Errors/Exceptions

Throws ImagickException on error.


<Imagick::setBackgroundColorImagick::setCompression>
^ImagickLast updated: Mon, 26 Oct 2026