clear;
s = 'baboonbw.png';
fig = imread(s);
fig = fig(81:88,81:88);

yq = compress(fig,1,'std');
figure(1); print('problem3_orig','-dpng');
figure(2); print('problem3_p1','-dpng'); dlmwrite('problem3_p1',yq);

yq = compress(fig,2,'std');
figure(2); print('problem3_p2','-dpng'); dlmwrite('problem3_p2',yq);

yq = compress(fig,4,'std');
figure(2); print('problem3_p4','-dpng'); dlmwrite('problem3_p4',yq);