Wand implode() function Python (original) (raw)
Last Updated : 27 Mar, 2023
implode() generates a kind of distorted image in which pull effect is noticed into the middle of the image. The amount argument controls the range of pixels to pull towards the center.
Syntax :
wand.image.implode(amount, method)
Parameters :
Parameter Input Type Description amount numbers.Real Normalized degree of effect between 0.0 & 1.0./td> method basestring Which interpolate method to apply to effected pixels.
Source Image:
Example 1:
Python3
from
wand.image
import
Image
with Image(filename
=
"koala.jpeg") as img:
`` img.implode(amount
=
0.35
)
`` img.save(filename
=
"impkoala.jpeg")
Output:
Example 2: Increasing amount value
Python3
from
wand.image
import
Image
with Image(filename
=
"koala.jpeg") as img:
`` img.implode(amount
=
0.5
)
`` img.save(filename
=
"impkoala2.jpeg")
Output:
Similar Reads
- Wand noise() function - Python The noise() function is an inbuilt function in the Python Wand ImageMagick library which is used to add noise to the image. Syntax: noise(noise_type, attenuate, channel) Parameters: This function accepts three parameters as mentioned above and defined below: noise_type: This parameter is used to sto 2 min read
- Wand point() function in Python point() is another drawing function and simplest of all. point() function basically draw a point on a particular point on an image. It simply takes two x, y arguments for the point coordinate. Syntax : wand.drawing.point(x, y) Parameters: ParameterInput TypeDescriptionxnumbers.Realx coordinate of po 1 min read
- Wand path_move() function in Python path_move() is another function introduced in wand for paths. The main aim of path_move() function is to set new starting point for a new sub_path. Given to parameter can be relative, or absolute, by setting the relative flag. Syntax : wand.drawing.path_move(to, relative) Parameters: Parameter Input 1 min read
- Python len() Function The len() function in Python is used to get the number of items in an object. It is most commonly used with strings, lists, tuples, dictionaries and other iterable or container types. It returns an integer value representing the length or the number of elements. Example: [GFGTABS] Python s = "G 2 min read
- Wand function() function in Python function() function is similar to evaluate function. In function() function pixel channels can be manipulated by applies a multi-argument function to pixel channels. Following are the list of FUNCTION_TYPES in Wand: 'undefined''arcsin''arctan''polynomial''sinusoid' Syntax : wand.image.function(funct 1 min read
- Wand circle() function in Python The circle() function is another Drawing function in Wand. This method is used to draw a circle in the image. It requires only two arguments that are origin and perimeter of the circle. Syntax: wand.drawing.circle(origin, perimeter)Â Parameters : ParameterInput TypeDescriptionorigin(collections.abc. 2 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
- Python open() Function The Python open() function is used to open internally stored files. It returns the contents of the file as Python objects. Python open() Function SyntaxThe open() function in Python has the following syntax: Syntax: open(file_name, mode)Â Parameters: file_name: This parameter as the name suggests, i 3 min read
- Python - evaluate() function in Wand 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 calcula 1 min read
- Python range() function The Python range() function returns a sequence of numbers, in a given range. The most common use of it is to iterate sequences on a sequence of numbers using Python loops. Example In the given example, we are printing the number from 0 to 4. [GFGTABS] Python for i in range(5): print(i, end=" 7 min read