Created
November 22, 2012 14:19
-
-
Save bayerj/4131398 to your computer and use it in GitHub Desktop.
ipython save image with pillow and display
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from IPython.core.display import Image as image | |
from PIL import Image | |
def save_and_display(arr, fname): | |
pilimg = Image.fromarray(arr) | |
pilimg.save(fname) | |
return image(filename=fname, width=600) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment