Gmagick::setimagecolorspace

(PECL gmagick >= Unknown)

Gmagick::setimagecolorspaceSets the image colorspace

Descrizione

public Gmagick::setimagecolorspace(int $colorspace): Gmagick

Sets the image colorspace.

Elenco dei parametri

colorspace

One of the Colorspace constant (Gmagick::COLORSPACE_*).

Valori restituiti

The Gmagick object.

Errori/Eccezioni

Throws an GmagickException on error.

add a note

User Contributed Notes 1 note

up
0
MPLong
14 years ago
Convert CMYK to RGB:

<?php
$cs
= $im->getimagecolorspace();
if (
$cs == Gmagick::COLORSPACE_CMYK)
{
$im->setImageColorspace(Gmagick::COLORSPACE_SRGB);
}
?>
To Top