![]() ![]() ![]() From IPython.display import ImageImage(filename='data/empire.jpg')updatedAs OP’s requirement is to use PIL, if you want to show inline image, you can use with numpy.asarray like this too: from matplotlib.pyplot import imshowimport numpy as npfrom PIL import Image%matplotlib inlinepilim = Image.open('data/empire.jpg', 'r')imshow(np.asarray(pilim))If you only require a preview rather than an inline, you may just use show like this: pilim = Image.open('data/empire.jpg', 'r')pilim.show.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |