clear
close all
im=imread('SpaceElevator.jpg');
quanta = 256;
imq1 = double(im) / 255;
imq1 = uint8(im * quanta);
imq1 = double(im) / quanta;
figure(53);imshow(imq1);
quanta = 64;
imq2 = double(im) / 255;
imq2 = uint8(im * quanta);
imq2 = double(im) / quanta;
figure(54);imshow(imq2);
quanta = 32;
imq3 = double(im) / 255;
imq3 = uint8(im * quanta);
imq3 = double(im) / quanta;
figure(55);imshow(imq3);
quanta = 16;
imq4 = double(im) / 255;
imq4 = uint8(im * quanta);
imq4 = double(im) / quanta;
figure(56);imshow(imq4);
figure(57);
subplot(4,1,1);imshow(imq1);
subplot(4,1,2);imshow(imq2);
subplot(4,1,3);imshow(imq3);
subplot(4,1,4);imshow(imq4);
here an example result (famous pic of lena)