pgmagick – Add text in images Last Updated : 08 May, 2020 Improve Improve Like Article Like Save Share Report In this article we will see how to add text to images using pgmagick library in Python. We can do this by using annotate() function. Sometimes, we need to add text to images like for its copyright or name of the organization the image is associated with. In this article we will create an image with a green background text ‘GeeksforGeeks’ on it and will manipulate text on it. # importing library from pgmagick.api import Image # using image function img = Image((300, 300), 'green') img.annotate('GeeksforGeeks') img.write('GeeksforGeeks.jpg') Output : Now, we will rotate the text to 45 degrees. # importing library from pgmagick.api import Image img = Image((300, 300), 'green') # annotate function img.annotate('GeeksforGeeks', angle = 45) img.write('geeksforgeeks.png') Now we will change font as well as size of text. # importing library from pgmagick.api import Image img = Image((300, 200), 'green') img.font("/usr/share/fonts/truetype/ttf-japanese-gothic.ttf") img.font_pointsize(26) # annotate function img.annotate('GeeksforGeeks') img.write('GeeksforGeeks.png') Output : Like Article Suggest improvement Next Adding Text on Image using Python - PIL Share your thoughts in the comments Add Your Comment Please Login to comment... Similar Reads Python - Scaling image using pgmagick pgmagick| creating color backgrounds Python - Edge extraction using pgmagick library Python - Sharpen and blur filtering using pgmagick pgmagick Python- Introduction and Installation Pgmagick equalize() method - Python Pgmagick gamma() method - Python Pgmagick sharpen() method - Python Pgmagick enhance() method - Python Pgmagick contrast() method - Python Like R RahulSabharwal Follow Article Tags : Python-pgmagick Python Practice Tags : python