Batch Image Resize with Python (with explanation) @DataScienceGarage
Batch Image Resize with Python (with explanation)  @DataScienceGarage
Uploaded June 2017 | Updated September 2026, 2 weeks ago
This is a fully explanation video tutorial how to create Real World Python application that perform Batch (multiple) image resizing for current folder.

For that following Python modules must be used:
cv2 - for image processing
glob - finds all the path names matching a specified pattern according to the rules.

The content of this video tutorial is:
0:04 - presenting real situation
0:20 - creating a Python project file
1. 0:34 - import glob and cv2 modules to the project
2. 0:48 - create a list of image (JPG) files that are stored in project folder. Here all image filenames read and stored to Numpy array.
1:17 - create a for loop that read all image files for processing
1:30 - reading all image files from directory (see explanation below)
3. 2:00 -create a variable for a resized (result) file
2:12 - explanation of cv2 resized method
4. 3:22 - define a name of windows that will show result resized image
5. 3:46 - Show result image on window for 0,5 sec.
6. 4:17 - Write and Save resized file as new one!
5:08 - Result!

Explanation to 1:30: presenting all types of reading image file to Python:
0 - graycolor
1 - RBG
-1 - RBG with Alpha channel

If you have any questions, just write it on comments!
Please Subscribe me to get more and more interesting Python tricks and tips!

P.S. glob is a 3rd party Python module. You can check how to install this module here: youtube.com/watch?v=XSp3aLKFKWY

Vytautas.
Batch Image Resize with Python (with explanation)Run Python on AWS EC2 (Step by Step Example)Python Real data Finance Stock Graph in HTML (2017 version!)Hyperparameter tuning for Ensemble of ML models (Simple Python Example)NLP with Tensorflow and Keras. Tokenizer, Sequences and PaddingMake Better Heatmap With Seaborn in PythonSpeech-To-Text. AWS Lambda function from S3 Event to AWS Transcribe (CloudWatch included)Landing at Warsaw Chopin Airport (from Belgrade to Washaw, Poland)Exam-Labs.com SCAM. Fake answers and Wrong Ads | REVIEWChocolate bar word intro animation by BlenderBI-DIRECTIONAL ATTENTION | Explained in high levelCompare ML Models in few clicks with PyCaret in Python - DEMO
Data Science Garage |

Batch Image Resize with Python (with explanation)

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER