filmov
tv
Resize Images Easily | Pillow | Python
Показать описание
Python is a versatile programming language that can be used for a lot of tasks. In this tutorial we will see how we can resize images with Python.
We will use the popular library Pillow for this. Pillow is a fork of the erstwhile PIL library for image manipulation.
In this tutorial we will see how we can resize images using Pillow and we will also talk about a common pitfall while using it.
Time codes:
---------------
00:00: Introduction
00:33: Introduction to Pillow
01:04: Resizing the image
06:51: Caution with Aspect ratio
08:00: Conclusion
Links:
-------
Other image manipulation libraries in Python:
- OpenCV
- Scikit-image
Social Media:
-----------------
Video Summary:
---------------------
Using Pillow, we can resize images in Python. Pillow can be installed from the PyPi server using "pip install pillow".
Resize function only takes a tuple of width and height. Without that we will get a ValueError.
Resize function also doesn't have any safeguards against aspect ratio changes. So, we need to make sure that the width and height passed in maintain the
Original proportions of the image. Otherwise it will either get skewed and squished or stretched.
Attributions:
---------------
Thumbnail Mt. Fuji - Photo by Tirachard Kumtanom from Pexels
Keyboard sounds - CC Attribution 3.0 License - By Anton from from freesound
Background Music - A New Orleans Crawfish Boil - Unicorn Heads - Youtube Audio
Lucky Cat - Video by Miguel Á. Padriñán from Pexels
Mt. Fuji - Free for commercial use - Image by K. Mishina from Pixabay
Tools/Gear:
---------
Operating System - Windows 10
Python IDE - Pycharm
Video Editor - Shotcut
Audio Editor - Audacity
Thumbnail Editor - Canva
We will use the popular library Pillow for this. Pillow is a fork of the erstwhile PIL library for image manipulation.
In this tutorial we will see how we can resize images using Pillow and we will also talk about a common pitfall while using it.
Time codes:
---------------
00:00: Introduction
00:33: Introduction to Pillow
01:04: Resizing the image
06:51: Caution with Aspect ratio
08:00: Conclusion
Links:
-------
Other image manipulation libraries in Python:
- OpenCV
- Scikit-image
Social Media:
-----------------
Video Summary:
---------------------
Using Pillow, we can resize images in Python. Pillow can be installed from the PyPi server using "pip install pillow".
Resize function only takes a tuple of width and height. Without that we will get a ValueError.
Resize function also doesn't have any safeguards against aspect ratio changes. So, we need to make sure that the width and height passed in maintain the
Original proportions of the image. Otherwise it will either get skewed and squished or stretched.
Attributions:
---------------
Thumbnail Mt. Fuji - Photo by Tirachard Kumtanom from Pexels
Keyboard sounds - CC Attribution 3.0 License - By Anton from from freesound
Background Music - A New Orleans Crawfish Boil - Unicorn Heads - Youtube Audio
Lucky Cat - Video by Miguel Á. Padriñán from Pexels
Mt. Fuji - Free for commercial use - Image by K. Mishina from Pixabay
Tools/Gear:
---------
Operating System - Windows 10
Python IDE - Pycharm
Video Editor - Shotcut
Audio Editor - Audacity
Thumbnail Editor - Canva
Комментарии