HomeImagickImagickDrawImagickPixelImagick Pixel IteratorImagick KernelDevelopmentTutorial Source codeReport an issue
Category
Example

Imagick::colorThresholdImage

← colorMatrixImage   complexImages →

Example

function colorThresholdImage($image_path, $start_color, $stop_color)
{
    $imagick = new \Imagick(realpath($image_path));

    $imagick->colorThresholdImage(
        $start_color,
        $stop_color,
    );
    header("Content-Type: image/jpeg");
    echo $imagick->getImageBlob();
}