Python - evaluate() function in Wand Last Updated : 10 Mar, 2023 Comments Improve Suggest changes Like Article Like Report In evaluate() function pixel channels can be manipulated by applying an arithmetic, relational, or logical expression. Syntax : wand.image.evaluate(operator, value, channel) Parameters : ParameterInput TypeDescriptionoperatorbasestringType of operation to calculate.valuenumbers.RealNumber to calculate with operator channelbasestringOptional channel to apply operation on. Following are the list of EVALUATE_OPS in Wand: EVALUATE_OPSDescription'undefined'it is the default EVALUATE_OPS.'abs'create an abstract evaluation.'add'add evaluation.'addmodulus'add modulus evaluation.'and'and evaluation.'cosine'evaluate from cosine function.'gaussiannoise'Add gaussian noise evaluation'impulsenoise'Add impulse noise evaluation'laplaciannoise'Add laplace noise evaluation'leftshift'bitwise leftshift'max'max evaluation'mean'mean evaluation added.'median'median evaluation added.'multiplicativenoise'Add multiplicative noise evaluation'multiply'multiply image evaluation'or'or evaluation'poissonnoise'Add poisson noise evaluation'pow'Add powe evaluation'rightshift'bitwise right shift'set'Add set evaluation'sine'Add sine function evaluation'threshold'Add threshold evaluation with particular threshold point.'thresholdblack'Add evaluation while threshold is black.'thresholdwhite'Add evaluation while threshold is white.'uniformnoise'Add uniform noise evaluation Source Image: Code Example 1: Python3 # Import Image from wand.image module from wand.image import Image # Read image using evaluate function with Image(filename ="koala.jpeg") as img: img.evaluate(operator ='rightshift', value = 1, channel ='blue') img.save(filename ="kl-enhanced.jpeg") Output Image: Code Example 2: Python3 # Import Image from wand.image module from wand.image import Image # Read image using evaluate function with Image(filename ="koala.jpeg") as img: img.evaluate(operator ='leftshift', value = 1, channel ='red') img.save(filename ="kl-enhanced2.jpeg") Output Image: Comment More infoAdvertise with us Next Article Python - evaluate() function in Wand R RahulSabharwal Follow Improve Article Tags : Python Python-gui Python-wand Practice Tags : python Similar Reads Wand alpha() function in Python The alpha() function is identical to the wand color() function. Similar to color() function, alpha() function draws a color on the image using current fill color, starting at specified position & method. Uses same arguments as color() method. Syntax: wand.drawing.alpha(x, y, method) Parameters : 2 min read Wand - blur() function in Python Blurring Image means making an image fuzzy or hazy. A blur image is indefinite and it is unable to see an image clearly. Blur is of many types, like - Adaptive blur, Gaussian blur, Selective Blur etc. In order to blur an image we use blur() function. blur() function takes three arguments. Example : 2 min read Wand enhance() function in Python Similar to despeckle() function this function also reduces noise of the image. enhance() function return an image with reduced noise of an image by applying an auto-filter. Syntax : wand.image.enhance() Parameters : No parameters in enhance() function Source Image: Example 1: Python3 # Import Image 1 min read Wand ellipse() function in Python ellipse() function is used to draw an ellipse on the image. Just similar to drawing circle the ellipse() function requires two pairs of point that is, origin and a pair of (x, y) radius of the ellipse. To draw a partial ellipse, provide a pair of starting & ending degrees as the third parameter. 2 min read Wand arc() function in Python arc() is a function present in wand.drawing module. arc() function draws an arc in the image. Youâll need to define three pairs of (x, y) coordinates. First & second pair of coordinates will be the minimum bounding rectangle, and the last pair define the starting & ending degree. Syntax : wa 2 min read Like