Friday, September 5, 2025
HomeLanguagesPHP | Imagick medianFilterImage() Function

PHP | Imagick medianFilterImage() Function

The Imagick::medianFilterImage() function is an inbuilt function in PHP which applies a digital filter that improves the quality of a noisy image.

Syntax:

bool Imagick::medianFilterImage( float $radius )

Parameters: The function accepts a single parameter $radius which holds the radius of the pixel neighborhood.

Return Value: This function returns TRUE on success.

Errors/Exceptions: This function throws an ImagickException on error.

Below program illustrates the Imagick::medianFilterImage() function in PHP:

Program:




<?php
  
// Create a new imagick object
$imagick = new Imagick(
   
// Applying the digital filter to the image
$imagick->medianFilterImage(10);
   
header("Content-Type: image/jpg");
  
// Display the output image
echo $imagick->getImageBlob();
  
?>


Output:

Reference: https://www.php.net/manual/en/imagick.medianfilterimage.php

Whether you’re preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, neveropen Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we’ve already empowered, and we’re here to do the same for you. Don’t miss out – check it out now!
Dominic
Dominichttp://wardslaus.com
infosec,malicious & dos attacks generator, boot rom exploit philanthropist , wild hacker , game developer,
RELATED ARTICLES

Most Popular

Dominic
32267 POSTS0 COMMENTS
Milvus
81 POSTS0 COMMENTS
Nango Kala
6635 POSTS0 COMMENTS
Nicole Veronica
11801 POSTS0 COMMENTS
Nokonwaba Nkukhwana
11865 POSTS0 COMMENTS
Shaida Kate Naidoo
6752 POSTS0 COMMENTS
Ted Musemwa
7026 POSTS0 COMMENTS
Thapelo Manthata
6703 POSTS0 COMMENTS
Umr Jansen
6720 POSTS0 COMMENTS