Gmagick::setimagecolorspace

(PECL gmagick >= Unknown)

Gmagick::setimagecolorspaceSets the image colorspace

Opis

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

Sets the image colorspace.

Parametry

colorspace

The image colorspace: UndefinedColorspace, RGBColorspace, GRAYColorspace, TransparentColorspace, OHTAColorspace, XYZColorspace, YCbCrColorspace, YCCColorspace, YIQColorspace, YPbPrColorspace, YPbPrColorspace, YUVColorspace, CMYKColorspace, sRGBColorspace, HSLColorspace, or HWBColorspace.

Zwracane wartości

The Gmagick object on success

Błędy/Wyjątki

Wywołuje wyjątek GmagickException w przypadku błędu.

add a note add a note

User Contributed Notes 1 note

up
0
MPLong
13 years ago
Convert CMYK to RGB:

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