From: talal hammouri on
Hi all,

I have used the following code from the wavelet toolbox help to compress true color image but i have the following remarks:
- i have not understand most of the code especially using wpeppesrs.wtc
- it takes long time to run the code
- is there any simple code to compress true color image
- if we want to compress other than this image(i.e wpeppers.jpg) what are the changes to this code since i;m not understand wpeppers.wtc.

Thank you very much

X = imread('wpeppers.jpg');
[CR,BPP] = wcompress('c',X,'wpeppers.wtc','spiht','maxloop',12);
Xc = wcompress('u','wpeppers.wtc');
subplot(1,2,1); image(X);
axis square;
title('Original Image')
subplot(1,2,2); image(Xc);
axis square;
title('Compressed Image - 12 steps - haar4')
xlabel({['Compression Ratio: ' num2str(CR,'%1.2f %%')], ...
['BPP: ' num2str(BPP,'%3.2f')]})
delete('wpeppers.wtc') Hi