The function imwrite has parameter 'Compression' like this.
imwrite(data, 'out.tif', 'Compression', 'lzw');
But I want to do this code not in tif files, unfortunately imwrite for compressed GIF files is not supported. Is there any way to do that? And could you explain that step by step? I'm begginer in Matlab.
The compression don't have to be lzw, another loseless compression is alright.
Best Answer