如何使用lzw算法进行图像压缩和解压缩 [英] how to do the image compression and decompression using lzw algorithm

查看:536
本文介绍了如何使用lzw算法进行图像压缩和解压缩的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我firjj bijali。我想知道如何使用LZW算法压缩和解压缩图像文件(.jpg或gif)。请帮帮我。

解决方案

根本就没有意义。两种类型的文件都已压缩。令人惊讶的是,GIF使用相同的LZW算法进行压缩: http://en.wikipedia.org/wiki/GIF [ ^ ]。



JPEG使用有损压缩算法,质量损失(取决于参数),因此其压缩因子更高。因此,LZH压缩几乎不会压缩它。请参阅: http://en.wikipedia.org/wiki/JPEG [ ^ ]。



-SA

I firoj bijali. I want to know how LZW algorithm is used to compress and decompress image file(.jpg or gif). Please help me.

解决方案

It makes no sense at all. Both types of files are already compressed. Amazingly, GIF is compressed using the same very LZW algorithm: http://en.wikipedia.org/wiki/GIF[^].

JPEG uses lossy compression algorithm, with loss of quality (which depends on parameters), so its compression factors are higher. Therefore, LZH compression will barely compress it. Please see: http://en.wikipedia.org/wiki/JPEG[^].

—SA


这篇关于如何使用lzw算法进行图像压缩和解压缩的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆