PIL
Requests
IO
Run using Jupyter NoteBook or any Python IDE.
- Enter Local Path of the Image File:
e.g C:\Users[Username]\Downloads[Image-Filename].[Extension]
- Format
C:\Users\Downloads\test.png
- Enter URL of the Image File:
e.g Direct Link/URL
- Format
https://static.desygner.com/wp-content/uploads/sites/13/2022/05/04141642/Free-Stock-Photos-01.jpg
- OR
Pillow (Python Imaging Library): Pillow is used for image manipulation tasks like opening, saving, and modifying images.
pip install Pillow
Requests library is used for making HTTP requests to download images from URLs. (It will be used in V1.1)
pip install requests
This module provides facilities for working with various types of I/O (input/output) in Python.
In the
V1.1
code, BytesIO from the io module is used to convert the response content from the requests library into a file-like object that PIL can work with.