« Imagick::separateImageChannel
Imagick::setBackgroundColor »

Imagick::sepiaToneImage

(PECL imagick 2, PECL imagick 3)

Imagick::sepiaToneImage — 画像をセピア調にする

説明

public function Imagick::sepiaToneImage(float $threshold): bool

画像に特殊効果を施し、セピア調の写真のような画像にします。 threshold には 0 から QuantumRange までの値を指定し、 これがセピア調の効き具合を表します。threshold を 80 にすると、 とりあえずはそれなりの効き目になるでしょう。

パラメータ

threshold

戻り値

成功した場合に true を返します。

エラー / 例外

エラー時に ImagickException をスローします。

例

例1 Imagick::sepiaToneImage()

<?php
function sepiaToneImage($imagePath, $sepia) {
    $imagick = new \Imagick(realpath($imagePath));
    $imagick->sepiaToneImage($sepia);
    header("Content-Type: image/jpg");
    echo $imagick->getImageBlob();
}

?>

関連キーワード:
Imagick   sepiaToneImage   画像   セピア   imagick   threshold   imagePath   sepia   separateImageChannel   setBackgroundColor   float   特殊効果   写真   QuantumRange   具合   効き目   成功   ImagickException   realpath   header   Content   Type   image   getImageBlob
関連する関数・ページ:
imagick.current   imagick.separateimagechannel   imagick.addimage   imagick.tostring   imagick.construct   imagick.getimagetype