#!/usr/bin/env python # coding: utf-8 # In[16]: from scipy.misc import imread, imshow, imresize, imsave import matplotlib get_ipython().run_line_magic('matplotlib', 'inline') import matplotlib.pyplot as plt # In[23]: img = imread('/Users/chengjun/github/cjc2016/figure/crop/wordcloud-1954.png') plt.imshow(img) plt.show() # In[24]: img = imresize(img,[400,300]) plt.imshow(img) plt.show() # In[7]: imsave('/Users/chengjun/github/cjc2016/figure/crop/rgb_gradient.png', img) # In[ ]: