LoginSignup
30
19

More than 5 years have passed since last update.

Jupyter上でPIL画像を表示する

Last updated at Posted at 2016-02-02

デモ

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

30
19
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
30
19