Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

resize multiple images to same size python

import PIL
import os
import os.path
from PIL import Image

f = r'c://Users/xx/Desktop/imagetest'
for file in os.listdir(f):
    f_img = f+"/"+file
    img = Image.open(f_img)
    img = img.resize((2296,1724))
    img.save(f_img)
Comment

PREVIOUS NEXT
Code Example
Python :: pandas row number by group 
Python :: how to save the history of keras model 
Python :: get difference of images python 
Python :: open administrator command prompt using python 
Python :: python calculate prime numbers until numer 
Python :: sacar la posicion en una lista python 
Python :: python get city name from IP 
Python :: django getting started 
Python :: arctan in python 
Python :: animate time series python 
Python :: How to add card in trello API using python 
Python :: shuffle array python 
Python :: selenium text returns empty string python 
Python :: import static in django urls 
Python :: how to exit the program in pygame 
Python :: adaptive thresholding with opencv python 
Python :: likeliness python 
Python :: how to delete everything on a file python 
Python :: plot tf model 
Python :: python transpose list 
Python :: opencv histogram equalization 
Python :: replace multiple spaces with single space python 
Python :: print last n rows of dataframe 
Python :: python print object 
Python :: python aritmethic print 
Python :: arabic in python 
Python :: python how to get alphabet 
Python :: flask clear session 
Python :: switching versions of python 
Python :: except index out of range python 
ADD CONTENT
Topic
Content
Source link
Name
5+8 =