Skip to content

Instantly share code, notes, and snippets.

@rashmibanthia
Created April 19, 2017 19:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rashmibanthia/f6896a2bbb4f1f273a9b80c3dfda61ff to your computer and use it in GitHub Desktop.
Save rashmibanthia/f6896a2bbb4f1f273a9b80c3dfda61ff to your computer and use it in GitHub Desktop.
from PIL import Image
import numpy as np
img = Image.open('10195.jpg') 
img = img.resize((100,100))    
arr = np.array(img) #save this 
print(arr.shape)
Image.fromarray(arr) #Check to see if you can get the image back from array
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment