ImageMagick Imagick::statisticImage

(PECL imagick 3 >= 3.3.0)

Imagick::statisticImage — 설명


설명

public Imagick::statisticImage(
    int $type,
    int $width,
    int $height,
    int $channel = Imagick::CHANNEL_DEFAULT
): bool
                

각 픽셀을 지정된 너비와 높이 근처의 해당 통계로 바꿉니다.


매개변수

type
width
height
channel

반환 값

성공하면 true를 반환합니다.


Examples

예제 #1 Imagick::statisticImage()

                  
<?php
function statisticImage($imagePath, $statisticType, $width, $height, $channel) {
    $imagick = new \Imagick(realpath($imagePath));

    $imagick->statisticImage(
        $statisticType,
        $width,
        $height,
        $channel
    );

    header("Content-Type: image/jpg");
    echo $imagick->getImageBlob();
}

statisticImage($imagePath, \Imagick::STATISTIC_MEDIAN, 5, 5, \Imagick::CHANNEL_DEFAULT);

?>