HomeImagickImagickDrawImagickPixelImagick Pixel IteratorImagick KernelDevelopmentTutorial Source codeReport an issue
Category
Example

Imagick::autoThresholdImage

← autoOrientate   bilateralBlurImage →

Example

function autoThresholdImage(
    $image_path,
    int $auto_threshold_method
) {
    $imagick = new \Imagick(realpath($image_path));
    $imagick->autoThresholdImage($auto_threshold_method);
    header("Content-Type: image/jpeg");
    echo $imagick->getImageBlob();
}