Imagick::linearStretchImage
(PECL imagick 2, PECL imagick 3)
Imagick::linearStretchImage — 画像の輝度を引き伸ばして飽和させる
説明
public Imagick::linearStretchImage
( float $blackPoint
, float $whitePoint
) : bool
画像の輝度を引き伸ばして飽和させます。
パラメータ
blackPoint
- 画像の黒の点。
whitePoint
- 画像の白の点。
返り値
成功した場合に true
を返します。
例
例1 Imagick::linearStretchImage()
<?phpfunction linearStretchImage($imagePath, $blackThreshold, $whiteThreshold) { $imagick = new \Imagick(realpath($imagePath)); $pixels = $imagick->getImageWidth() * $imagick->getImageHeight(); $imagick->linearStretchImage($blackThreshold * $pixels, $whiteThreshold * $pixels); header("Content-Type: image/jpg"); echo $imagick->getImageBlob();}?>