Skip to content

Instantly share code, notes, and snippets.

@GeorgeSeif
Created September 23, 2018 22:24
Show Gist options
  • Select an option

  • Save GeorgeSeif/f2a6084233abfd9f69b5b9fe72ed7a9a to your computer and use it in GitHub Desktop.

Select an option

Save GeorgeSeif/f2a6084233abfd9f69b5b9fe72ed7a9a to your computer and use it in GitHub Desktop.
import glob
import os
import cv2
### Loop through all jpg files in the current folder
### Resize each one to size 600x600
for image_filename in glob.glob("*.jpg"):
### Read in the image data
img = cv2.imread(image_filename)
### Resize the image
img = cv2.resize(img, (600, 600))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment