array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'de', ), 'this' => array ( 0 => 'function.imagegammacorrect.php', 1 => 'imagegammacorrect', ), 'up' => array ( 0 => 'ref.image.php', 1 => 'GD- und Image-Funktionen', ), 'prev' => array ( 0 => 'function.imagefttext.php', 1 => 'imagefttext', ), 'next' => array ( 0 => 'function.imagegd2.php', 1 => 'imagegd2', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'de', 'path' => 'reference/image/functions/imagegammacorrect.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PHP 4, PHP 5, PHP 7, PHP 8)
imagegammacorrect — Wendet eine Gamma-Korrektur auf ein GD-Bild an
Wendet eine Gamma-Korrektur auf das angegebene image
an, wobei Eingangs- und Ausgangsgamma angegeben werden.
image
Ein GdImage-Objekt, das von einer der Funktionen zur Bilderzeugung, z. B. imagecreatetruecolor(), zurückgegeben wurde.
input_gamma
Das Eingangsgamma.
output_gamma
Das Ausgangsgamma.
Version | Beschreibung |
---|---|
8.0.0 |
image erwartet nun eine
GdImage-Instanz; vorher wurde eine gültige
gd -Ressource erwartet.
|
Beispiel #1 Die Verwendung von imagegammacorrect()
<?php
// Erzeuge ein Bild
$im = imagecreatefromgif('php.gif');
// Korrigiere Gamma, Ausgangsgamma = 1.537
imagegammacorrect($im, 1.0, 1.537);
// Speichere Bild und gib den Speicher frei
imagegif($im, './php_gamma_corrected.gif');
imagedestroy($im);
?>