From the course: Python Essential Libraries
Unlock the full course today
Join today to access over 22,500 courses taught by industry experts or purchase this course individually.
Editing images - Python Tutorial
From the course: Python Essential Libraries
Editing images
- [Instructor] All right, let's finish up our introduction to the Pillow imaging library with some examples, of editing the contents of images. The Pillow library provides capabilities for altering the pixel content of images, by using a simple 2D graphics drawing API. You can use theses functions to create new images or annotate or retouch existing images, and to generate graphics on the fly for a variety of uses. Such as water marking images on the web. So for our first example let's take an existing image and draw some simple content into it. So to do that let's go ahead and open our editing underscore start file. In order to make use of these drawing functions, I need to import the ImageDraw class. So let's go ahead and do that up here. I'll import ImageDraw. All right, then I'll open the image using, the same method that we've seen so far. So I'm going to call the open function on the image class and pass in my infile…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.