Wand composite() function in Python Last Updated : 11 May, 2020 Comments Improve Suggest changes Like Article Like Report The composite() function renders an image on top of the drawing subject image using COMPOSITE_OPERATORS. A compositing image must be given with a destination top, left, width, and height values. Syntax: wand.drawing.composite(image, left, top, operator, arguments, gravity) Parameters : Parameter Input Type Description image wand.image.Image the image placed over the current image left numbers.Integral the x-coordinate where image will be placed top numbers.Integral the y-coordinate where image will be placed operator basestring the operator that affects how the composite is applied to the image. arguments basestring Additional numbers given as a geometry string, or comma delimited values. This is needed for 'blend', 'displace', 'dissolve', and 'modulate' operators. gravity basestring Calculate the top & left values based on gravity value from GRAVITY_TYPES. The following is the list of COMPOSITE_OPERATORS : ('undefined', 'alpha', 'atop', 'blend', 'blur', 'bumpmap', 'change_mask', 'clear', 'color_burn', 'color_dodge', 'colorize', 'copy_black', 'copy_blue', 'copy', 'copy_cyan', 'copy_green', 'copy_magenta', 'copy_alpha', 'copy_red', 'copy_yellow', 'darken', 'darken_intensity', 'difference', 'displace', 'dissolve', 'distort', 'divide_dst', 'divide_src', 'dst_atop', 'dst', 'dst_in', 'dst_out', 'dst_over', 'exclusion', 'hard_light', 'hard_mix', 'hue', 'in', 'intensity', 'lighten', 'lighten_intensity', 'linear_burn', 'linear_dodge', 'linear_light', 'luminize', 'mathematics', 'minus_dst', 'minus_src', 'modulate', 'modulus_add', 'modulus_subtract', 'multiply', 'no', 'out', 'over', 'overlay', 'pegtop_light', 'pin_light', 'plus', 'replace', 'saturate', 'screen', 'soft_light', 'src_atop', 'src', 'src_in', 'src_out', 'src_over', 'threshold', 'vivid_light', 'xor', 'stereo') Input Images: Image #1: Image #2: Example #1: Python3 1== from wand.image import Image, COMPOSITE_OPERATORS from wand.drawing import Drawing from wand.display import display gog = Image(filename ='gog.png') road = Image(filename ='rd.jpg') g = gog.clone() r = road.clone() with Drawing() as draw: # composite image with color_burn operator draw.composite(operator ='color_burn', left = 20, top = 30, width = r.width, height = r.height, image = r) draw(g) g.save(filename ="colorburn.png") display(g) Output : Example #1: Python3 1== from wand.image import Image, COMPOSITE_OPERATORS from wand.drawing import Drawing from wand.display import display gog = Image(filename ='gog.png') road = Image(filename ='rd.jpg') g = gog.clone() r = road.clone() with Drawing() as draw: # composite image with dissolve operator draw.composite(operator = 'luminize', left = 20, top = 30, width = g.width, height = g.height, image = g) draw(r) r.save(filename ="dissolve.png") display(r) Output: Comment More info R RahulSabharwal Follow Improve Article Tags : Python Python-gui Python-wand Explore Python FundamentalsPython Introduction 3 min read Input and Output in Python 4 min read Python Variables 5 min read Python Operators 5 min read Python Keywords 2 min read Python Data Types 7 min read Conditional Statements in Python 3 min read Loops in Python - For, While and Nested Loops 6 min read Python Functions 5 min read Recursion in Python 4 min read Python Lambda Functions 5 min read Python Data StructuresPython String 5 min read Python Lists 4 min read Python Tuples 4 min read Python Dictionary 3 min read Python Sets 6 min read Python Arrays 7 min read List Comprehension in Python 4 min read Advanced PythonPython OOP Concepts 11 min read Python Exception Handling 5 min read File Handling in Python 4 min read Python Database Tutorial 4 min read Python MongoDB Tutorial 2 min read Python MySQL 9 min read Python Packages 12 min read Python Modules 7 min read Python DSA Libraries 15 min read List of Python GUI Library and Packages 3 min read Data Science with PythonNumPy Tutorial - Python Library 3 min read Pandas Tutorial 6 min read Matplotlib Tutorial 5 min read Python Seaborn Tutorial 15+ min read StatsModel Library- Tutorial 4 min read Learning Model Building in Scikit-learn 8 min read TensorFlow Tutorial 2 min read PyTorch Tutorial 6 min read Web Development with PythonFlask Tutorial 8 min read Django Tutorial | Learn Django Framework 7 min read Django ORM - Inserting, Updating & Deleting Data 4 min read Templating With Jinja2 in Flask 6 min read Django Templates 7 min read Python | Build a REST API using Flask 3 min read How to Create a basic API using Django Rest Framework ? 4 min read Python PracticePython Quiz 3 min read Python Coding Practice 1 min read Python Interview Questions and Answers 15+ min read Like