downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | conferences | my php.net

search for in the

Gmagick::setimagecompose> <Gmagick::setimagechanneldepth
[edit] Last updated: Mon, 20 May 2013

view this page in

Gmagick::setimagecolorspace

(PECL gmagick >= Unknown)

Gmagick::setimagecolorspaceSets the image colorspace

Description

public Gmagick Gmagick::setimagecolorspace ( int $colorspace )

Sets the image colorspace.

Parameters

colorspace

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

Return Values

The Gmagick object on success

Errors/Exceptions

Throws an GmagickException on error.



add a note add a note User Contributed Notes Gmagick::setimagecolorspace - [1 notes]
up
0
MPLong
2 years ago
Convert CMYK to RGB:

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

 
show source | credits | sitemap | contact | advertising | mirror sites