Python PIL |ImageDraw.Draw.multiline_text() Last Updated : 09 Sep, 2019 Summarize Comments Improve Suggest changes Share Like Article Like Report PIL is the Python Imaging Library which provides the python interpreter with image editing capabilities. The ImageDraw module provide simple 2D graphics for Image objects. You can use this module to create new images, annotate or retouch existing images, and to generate graphics on the fly for web use. ImageDraw.Draw.multiline_text() Draws the string at the given position. Syntax: ImageDraw.Draw.multiline_text(xy, text, fill=None, font=None, anchor=None, spacing=0, align="left") Parameters: xy – Top left corner of the text. text – Text to be drawn. fill – Color to use for the text. font – An ImageFont instance. spacing – The number of pixels between lines. align – If the text is passed on to multiline_text(), “left”, “center” or “right”. Return Type:- returns an image with text. Image Used: Code : Example of ImageDraw.Draw.multiline_text() Python3 1== # Importing Image and ImageFont, ImageDraw module from PIL package from PIL import Image, ImageFont, ImageDraw # creating a image object image = Image.open(r'C:\Users\System-Pc\Desktop\ROSE.jpg') draw = ImageDraw.Draw(image) # specified font size font = ImageFont.truetype(r'C:\Users\System-Pc\Desktop\arial.ttf', 15) spacing = 50 text = u"""\ ALWAYS BE HAPPY (LAUGHING IS THE \n BEST MEDICINE)""" # drawing text size draw.text((6, 8), text, fill ="red", font = font, spacing = spacing, align ="right") image.show() Output: Another Example:Here we changing parameter. Image Used: Code : Example of ImageDraw.Draw.multiline_text() Python3 1== # Importing Image and ImageFont, ImageDraw module from PIL package from PIL import Image, ImageFont, ImageDraw # creating a image object image = Image.open(r'C:\Users\System-Pc\Desktop\flower.jpg') draw = ImageDraw.Draw(image) # specified font size font = ImageFont.truetype(r'C:\Users\System-Pc\Desktop\arial.ttf', 15) spacing = 50 text = u"""\ ALWAYS BE HAPPY (LAUGHING IS THE \n BEST MEDICINE)""" # drawing text size draw.text((6, 8), text, fill ="black", font = font, spacing = spacing, align ="right") image.show() Output: Comment More infoAdvertise with us Next Article Python PIL | ImageDraw.Draw.line() S Sunitamamgai Follow Improve Article Tags : Python Image-Processing Practice Tags : python Similar Reads Python PIL | ImageDraw.Draw.multiline_textsize() PIL is the Python Imaging Library which provides the python interpreter with image editing capabilities. The ImageDraw module provide simple 2D graphics for Image objects. You can use this module to create new images, annotate or retouch existing images, and to generate graphics on the fly for web u 1 min read Python PIL | ImageDraw.Draw.text() PIL is the Python Imaging Library which provides the python interpreter with image editing capabilities. The ImageDraw module provide simple 2D graphics for Image objects. You can use this module to create new images, annotate or retouch existing images, and to generate graphics on the fly for web u 2 min read Python PIL | ImageDraw.Draw.line() PIL is the Python Imaging Library which provides the python interpreter with image editing capabilities. The ImageDraw module provide simple 2D graphics for Image objects. You can use this module to create new images, annotate or retouch existing images, and to generate graphics on the fly for web u 2 min read Python PIL | ImageDraw.Draw.rectangle() PIL is the Python Imaging Library which provides the python interpreter with image editing capabilities. The ImageDraw module provide simple 2D graphics for Image objects. You can use this module to create new images, annotate or retouch existing images, and to generate graphics on the fly for web u 2 min read Python PIL | ImageDraw.Draw.polygon() Method PIL is the Python Imaging Library which provides the python interpreter with image editing capabilities. The ImageDraw module provide simple 2D graphics for Image objects. You can use this module to create new images, annotate or retouch existing images, and to generate graphics on the fly for web u 2 min read Python Pillow - ImageDraw Module Python's Pillow which is a fork of the discontinued Python Imaging Library (PIL) is a powerful library that is capable of adding image processing capabilities to your python code. Pillow offers many modules that ease the process of working and modifying images. In this article, we will have a look a 5 min read Like