PHP 8.1.0 Beta 1 available for testing

Gmagick::setimagecolorspace

(PECL gmagick >= Unknown)

Gmagick::setimagecolorspaceSets the image colorspace

Açıklama

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

Sets the image colorspace.

Değiştirgeler

colorspace

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

Dönen Değerler

The Gmagick object.

Hatalar/İstisnalar

Hata durumunda bir GmagickException istisnası oluşur.

add a note add a note

User Contributed Notes 1 note

up
0
MPLong
11 years ago
Convert CMYK to RGB:

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