ImagickPixel
PHP Manual

ImagickPixel::setColorValueQuantum

(No version information available, might only be in Git)

ImagickPixel::setColorValueQuantumDescription

Beschreibung

public void ImagickPixel::setColorValueQuantum ( int $color , mixed $value )

Sets the quantum value of a color element of the ImagickPixel.

Warnung

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

Parameter-Liste

color

Which color element to set e.g. \Imagick::COLOR_GREEN.

value

The quantum value to set the color element to. This should be a float if ImageMagick was compiled with HDRI otherwise an int in the range 0 to Imagick::getQuantum().

Rückgabewerte

Beispiele

Beispiel #1 ImagickPixel::setColorValueQuantum()

<?php
function setColorValueQuantum() {
    
$image = new \Imagick();

    
$quantumRange $image->getQuantumRange();

    
$draw = new \ImagickDraw();
    
$color = new \ImagickPixel('blue');
    
$color->setcolorValueQuantum(\Imagick::COLOR_RED128 $quantumRange['quantumRangeLong'] / 256);

    
$draw->setstrokewidth(1.0);
    
$draw->setStrokeColor($color);
    
$draw->setFillColor($color);
    
$draw->rectangle(200200300300);

    
$image->newImage(500500"SteelBlue2");
    
$image->setImageFormat("png");

    
$image->drawImage($draw);

    
header("Content-Type: image/png");
    echo 
$image->getImageBlob();
}

?>


ImagickPixel
PHP Manual