Open In App

Wand mode() function - Python

Last Updated : 19 May, 2021
Comments
Improve
Suggest changes
Like Article
Like
Report

The mode() function is an inbuilt function in the Python Wand ImageMagick library which is used to replace each pixel with the mathematical mode of the neighboring colors.

Syntax: 

mode(width, height)

Parameters: This function accepts two parameters as mentioned above and defined below:  

  • width: This parameter is used to store the number of neighboring pixels to include in mode.
  • height: This is an optional parameter is used to store height of neighboring pixels. By default it is same as width.


Return Value: This function returns the Wand ImageMagick object.


Original Image: 


Example 1: 

Output: 

Example 2:  

Output: 
 


 


Next Article
Practice Tags :

Similar Reads