Pillow Python

How to rotate an image in Pillow Python

How to rotate an image in Pillow Python

In this article, you’ll see how to rotate an image in Pillow Python. To rotate an image you have to specify the angle of rotation. Output: Rotate an Image with expand parameter Output: Recommendation: Computer Vision: Models, Learning, and Inference Book

PIL image crop

How to crop an image in PIL (Pillow Python)

In this article, you’ll see how to crop an image in PIL Python. To crop an image you have to specify the exact position (points). In the following example, (0,0) is the start point, and (500, 300) is the endpoint. Output: Recommendation: Computer Vision: Models, Learning, and Inference Book

How to save an image in Pillow Python

How to save an image in Pillow Python

In this article, you’ll see how to save an image in Pillow Python. To read and save an image you just need to change the name and location of the image. Output: Recommendation: Computer Vision: Models, Learning, and Inference Book

PIL image resize

How to resize an image in PIL (Pillow Python)

In this article, you’ll see how to resize an image in the PIL Python module. You can specify the width and height according to your requirement. In the following example, “cats.jpg” is the name of an image. Recommendation: Computer Vision: Models, Learning, and Inference Book

How to find the mode and type of an image in PIL

How to find the mode and type of an image in PIL (Pillow)

In this article, you’ll see how to find the mode and type of an image in the PIL module. You just have to change the name and location of the image. Output: RGB <class ‘PIL.JpegImagePlugin.JpegImageFile’> Recommendation: Computer Vision: Models, Learning, and Inference Book

PIL image size

How to find the PIL image size

In this article, you’ll see how to find the PIL image size in Python. You just have to use the following code. I highly recommend you get the “Computer Vision: Models, Learning, and Inference Book” to learn Computer Vision. Output: (1279, 711)

from PIL import Image

from PIL import Image

In this article, you’ll see how to import the PIL module in Python and why we import PIL instead of Pillow. You will also know why we use “from PIL import Image“. If you want to learn Computer Vision then I will highly recommend you to read This book. Import Pillow library The following code will import the …

from PIL import Image Read More »

How to convert pil image to NumPy array

How to convert PIL image to NumPy array

You can convert the PIL image to a NumPy array with the following code. If you want to learn Python, I highly recommend reading This Book. Output: <class ‘PIL.JpegImagePlugin.JpegImageFile’> <class ‘numpy.ndarray’> Free Learning Resources