Skip to content

Commit c782049

Browse files
committed
add the gamma method on the main class to enable or not the gamma correction on the image color
1 parent 1024ed9 commit c782049

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

lib/ImageResize.php

+13
Original file line numberDiff line numberDiff line change
@@ -760,4 +760,17 @@ public function imageFlip($image, $mode)
760760
}
761761
imagedestroy($temp_image);
762762
}
763+
764+
/**
765+
* Enable or not the gamma color correction on the image, enabled by default
766+
*
767+
* @param bool $enable
768+
* @return static
769+
*/
770+
public function gamma($enable = true)
771+
{
772+
$this->gamma_correct = $enable;
773+
774+
return $this;
775+
}
763776
}

0 commit comments

Comments
 (0)