ImageFilter(コントラスト)
ImageFilterをIMG_FILTER_CONTRASTパラメータで使う事により、コントラストを変更できます。 ImageFilterの第3引数がコントラストレベルになります。
なお、設定によってはImageFilterを使えないのでご注意下さい。
サンプルコード
<?php
$img = ImageCreateFromJPEG('sample0.jpg');
ImageFilter($img, IMG_FILTER_CONTRAST, -50);
header('Content-Type: image/jpeg');
ImageJPEG($img);
?>
動作例
<img src="script/imagefilter-contrast.php">
元画像
