Advertisement
Guest User

Untitled

a guest
Apr 26th, 2018
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.20 KB | None | 0 0
  1. def resize_img(img):
  2.  
  3.     wpercent = (img_shape[0] / float(img.size[0]))
  4.     hsize = int((float(img.size[1]) * float(wpercent)))
  5.     img = img.resize((img_shape[0] , hsize), PIL.Image.ANTIALIAS)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement