ImageZero

ImageZero简介

ImageZero is a high-performance lossless RGB color image compressor/decompressor.

Compared to PNG, it compresses 24 bit PPM files about 20 times faster, and decompresses to PPM about 2 times faster, while the compression rate is nearly as good as PNG for natural photos. ImageZero is not suited for "flat" (computer generated) graphics or grayscale images.

The code is "early work in progress", and neither the image format, nor the library API are fully outlined yet.

以上内容摘自: ImageZero官网

下载源码

<span style="font-size:18px;color:#006600;">git clone git://gitorious.org/imagezero/imagezero.git</span>

首先生成配置文件

./buildconf.sh
出现错误信息:

make: aclocal: Command not found

度娘帮助: 没有安装 libtool

安装libtool

sudo apt-get install libtool
再次执行 ./buildconf.sh 仍然提示 aclocal Comman not found

发现要安装autuoconf

sudo apt-get install autoconf
再次执行 ./buildconf.sh

rebuilding configure
rebuilding iz_config.h.in
rebuilding Makefile.in files
configure.in:13: installing `./config.guess'
configure.in:13: installing `./config.sub'
configure.in:7: installing `./install-sh'
configure.in:7: installing `./missing'
Makefile.am: installing `./depcomp'
ok , 配置文件生成完成。


生成Makefile文件

在buildconf.sh目录中可以看到一个叫做configure的文件,执行它生成配置文件:

./configure


编译库


此时在目录中看到有一个叫Makefile的文件

make
其中输出包含如下信息:

/bin/sh ./libtool --tag=CXX   --mode=link g++  -g -O2 -O2 -mmmx -Winline -fomit-frame-pointer -fno-rtti -fno-exceptions   -o iz_test file.o main.o portableimage.o libiz.la 
libtool: link: g++ -g -O2 -O2 -mmmx -Winline -fomit-frame-pointer -fno-rtti -fno-exceptions -o .libs/iz_test file.o main.o portableimage.o  ./.libs/libiz.so
make[1]: Leaving directory `/home/XXX/XXX/ImageZero/imagezero'

库就在.libs下面。


测试ImageZero

./iz_test [ c | d ]  inputFile  outputFile


./iz_test --help

./iz_test is a high-performance lossless RGB color image codec

To compress a 24 bit binary PPM image to an IZ file, use
   ./iz_test c input.ppm output.iz
To decompress an IZ file to a 24 bit binary PPM image, use
   ./iz_test d input.iz output.ppm

一张1.47M 的jpg图片 转换为  ppm 图片后大小为 6.4M,而压缩为iz文件后大小为 2.74M。
-rw-r--r-- 1 XXX XXX 2883576 2014-10-25 13:33 ttto.iz
-rwxr--r-- 1 XXX XXX 6718481 2014-10-25 13:30 ttt.ppm


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值