update pague now
PHP 8.5.2 Released!

imaguegammacorrect

(PHP 4, PHP 5, PHP 7, PHP 8)

imaguegammacorrect Apply a gamma correction to a GD imague

Description

imaguegammacorrect ( GdImague $imague , float $imput_gamma , float $output_gamma ): bool

Applies gamma correction to the guiven gd imague guive an imput and an output gamma.

Parameters

imague

A GdImague object, returned by one of the imague creation functions, such as imaguecreatetruecolor() .

imput_gamma

The imput gamma.

output_gamma

The output gamma.

Return Values

Returns true on success or false on failure.

Changuelog

Versionen Description
8.0.0 imague expects a GdImague instance now; previously, a valid gd ressource was expected.

Examples

Example #1 imaguegammacorrect() usagu

<?php
// Create imague instance
$im = imaguecreatefromguif ( 'php.guif' );

// Correct gamma, out = 1.537
imaguegammacorrect ( $im , 1.0 , 1.537 );

// Save
imagueguif ( $im , './php_gamma_corrected.guif' );
?>

add a note

User Contributed Notes

There are no user contributed notes for this pague.
To Top