当前位置: 首页 > 工具软件 > ImageZero > 使用案例 >

ImageZero

汪兴旺
2023-12-01

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


 类似资料:

相关阅读

相关文章

相关问答