clear;
s = 'baboonbw.png';
fig = imread(s);

yq = compress(fig,1,'jpeg');
figure(1); print('problem4e_orig','-dpng');
figure(2); print('problem4e_p1','-dpng'); dlmwrite('problem4e_p1',yq);

fig = fig(81:88,81:88);
yq = compress(fig,1,'jpeg');
figure(1); print('problem4_orig','-dpng');
figure(2); print('problem4_p1','-dpng'); dlmwrite('problem4_p1',yq);