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

search for in the

Gmagick::setimagecompose> <Gmagick::setimagechanneldepth
[edit] Last updated: Fri, 18 May 2012

view this page in

Gmagick::setimagecolorspace

(PECL gmagick >= Unknown)

Gmagick::setimagecolorspaceSets the image colorspace

Beschreibung

public Gmagick Gmagick::setimagecolorspace ( int $colorspace )

Sets the image colorspace.

Parameter-Liste

colorspace

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

Rückgabewerte

The Gmagick object on success

Fehler/Exceptions

Wirft bei einem Fehler eine GmagickException.



add a note add a note User Contributed Notes Gmagick::setimagecolorspace
MPLong 28-Jun-2010 11:24
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