Image Compression Question SVG problem (Huffman & LZW)

I am doing a project in matlab which compress an image file usign the two algorithm.
I am using a GUI and it needs to be displayed first before compressing. But it's not showing in my GUI (axes). I can only compress image format like (PNG, JPEG,BMP,TIFF,GIF) but not SVG file.
My question is, is it possible to compress an .SVG file for my project? or is there any way to do it? or is it achievable?

3 件のコメント

ngs sdfgh
ngs sdfgh 2019 年 3 月 19 日
編集済み: ngs sdfgh 2019 年 3 月 19 日
Wait?! can LZW compress JPEG? please share me the code, am conducting my MSC in IT thesis entitled "Improving LZW Image compression". thanks in advance
Nikolo
Nikolo 2019 年 3 月 19 日
You can find the code in file exchange. I got it there and edit some code to make it work for image files
Walter Roberson
Walter Roberson 2019 年 3 月 19 日
Yes, LZW can compress JPEG. The question would be whether it can do a good job of it.
You should differentiate between .jpg files (which are probably really JFIF https://en.wikipedia.org/wiki/JPEG_File_Interchange_Format) and the JPEG block of coefficients, which is a block that can be embedded in a number of different image file formats. .jpg files have headers and comments and so on and so generally have something compressible in them. JPEG blocks of coefficients are already fairly compact and would not be expected to compress well.

サインインしてコメントする。

回答 (1 件)

Walter Roberson
Walter Roberson 2019 年 3 月 19 日

0 投票

imread() cannot read .svg files. SVG are vector graphics that need to be interpreted.

質問済み:

2019 年 2 月 20 日

コメント済み:

2019 年 3 月 19 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by