PHP Doku:: Sets the image colorspace - function.imagick-setimagecolorspace.html

Verlauf / Chronik / History: (12) anzeigen

Sie sind hier:
Doku-StartseitePHP-HandbuchFunktionsreferenzBildverarbeitung und -generierungImage Processing (ImageMagick)The Imagick classImagick::setImageColorspace

Ein Service von Reinhard Neidl - Webprogrammierung.

The Imagick class

<<Imagick::setImageColormapColor

Imagick::setImageCompose>>

Imagick::setImageColorspace

(PECL imagick 2.0.0)

Imagick::setImageColorspaceSets the image colorspace

Beschreibung

bool Imagick::setImageColorspace ( int $colorspace )
Warnung

Diese Funktion ist bis jetzt nicht dokumentiert. Es steht nur die Liste der Argumente zur Verfügung.

Sets the image colorspace.

Parameter-Liste

colorspace

Rückgabewerte

Liefert TRUE bei Erfolg.

Fehler/Exceptions

Wirft ImagickException bei Fehlern.


3 BenutzerBeiträge:
- Beiträge aktualisieren...
mettedraq at gmail dot com
1.07.2010 21:21
This is how to Monochrome a jpg [on Windows].. since I couldn't find it anywhere else.

<?php
header
("Content-type: image/jpeg");

$IMagick = new IMagick('c:\\testing\\fruit.jpg');
$IMagick->setImageColorSpace(Imagick::COLORSPACE_GRAY);

echo
$IMagick;
?>
charlie at midsouthhost dot com
7.05.2010 6:45
If your getting strange/bad color rendering from a PDF, after trying the colorspace constants noted by jdstraughan, try other values outside that range.

In one case for me only $image->setImageColorSpace(22) provided useful color. I have found posts elsewhere using values up to 255.
jdstraughan dot com at gmail dot com
26.09.2008 21:16
FYI, here is the breakdown for (int $colorspace):

Constants:
0 - UndefinedColorspace   
1 - RGBColorspace   
2 - GRAYColorspace   
3 - TransparentColorspace   
4 - OHTAColorspace   
5 - LABColorspace   
6 - XYZColorspace   
7 - YCbCrColorspace   
8 - YCCColorspace   
9 - YIQColorspace   
10 - YPbPrColorspace   
11 - YUVColorspace   
12 - CMYKColorspace   
13 - sRGBColorspace   
14 - HSBColorspace   
15 - HSLColorspace   
16 - HWBColorspace



PHP Powered Diese Seite bei php.net
The PHP manual text and comments are covered by the Creative Commons Attribution 3.0 License © the PHP Documentation Group - Impressum - mail("TO:Reinhard Neidl",...)