在网上找了一圈,终于发现了有效的方法了。

img=imread('lena.jpg');
figure(1);
imshow(img);
figure(2)
imshow(img,'border','tight')     #only use it