Opening image
You can open any image using PIL.Image.open() method.
Syntax: PIL.Image.open(fp, mode=’r’)
Code:
Python3
from PIL import Image image = Image. open ( 'nature.jpg' ) image.show() |
Output:
Python Pillow – Working with Images
In this article, we will see how to work with images using Pillow in Python. We will discuss basic operations like creating, saving, rotating images. So let’s get started discussing in detail but first, let’s see how to install pillow.
Installation
To install this package type the below command in the terminal.
pip install pillow