20
Help us understand the problem. What are the problem?

More than 5 years have passed since last update.

posted at

updated at

Jupyter上でPIL画像を表示する

デモ

show_Pillow_on_Jupyter.png

nbviewer
http://nbviewer.jupyter.org/gist/Tatejimaru/9272c82e2d85a7498901

方法

ここではmatplotlibのimshow関数を使います。

from PIL import Image
import matplotlib.pyplot as plt
import numpy as np

im = Image.open("hoge.png", "r")
plt.imshow(np.array(im))

参考

python - How to show PIL Image in ipython notebook - Stack Overflow
http://stackoverflow.com/questions/26649716/how-to-show-pil-image-in-ipython-notebook

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
20
Help us understand the problem. What are the problem?