课程: Python Essential Libraries
今天就学习课程吧!
今天就开通帐号,24,100 门业界名师课程任您挑!
Basic image operations
- [Narrator] Let's get started working with Pillow by performing some basic image operations. So if you look in the exercise files folder, you will see that I've included a folder named ImagesArchive, that is full of sample images for you to experiment with and to serve as examples for this chapter. All right, so let's go ahead and open the Basics_Start.py file in our editor. Now to use Pillow, you import the modules that you need from the PIL Library, and yeah, I realize it's a bit confusing that they kept the PIL name instead of calling it Pillow. It's probably because of backwards compatibility, there's a lot of code out there that probably uses PIL as the name. And one of the most basic modules is the image class, which provides features for operations such as loading and saving images and working directly with pixels and a whole lot more. And you can see, I've already imported the image class. So let's try…
随堂练习,边学边练
下载课堂讲义。学练结合,紧跟进度,轻松巩固知识。