Home

Awesome

zimg

Project zimg is a lightweight image storage and processing system. It's written in C and it has high performance in image field. The zimg is designed for high concurrency image server. It supports many features for storing and processing images.

Homepage: zimg.buaa.us
Author: @招牌疯子
Contact me: zp@buaa.us

Build Status wercker status Join the chat at https://gitter.im/buaazp/zimg

Versions:

Synopsis

Supplying:

Uploading, downloading and processing images through HTTP protocol.
High performance in concurrency I/O and compressing image.
Support lua scripts to deal with customize compressing strategy.
Support memcached and redis protocols to save images into distributed storage backends.
Varied config options for operation and maintenance.

More usages are in Guidebook of zimg.

Build:

You should build dependences first. If you want to use distributed storage, make sure the optional storage backends beansdb(memcached protocol), or ssdb(redis protocol) is working well.
More information of building zimg is in Install Guide.

git clone https://github.com/buaazp/zimg -b master --depth=1
cd zimg   
make  
cd bin  
./zimg conf/zimg.lua

Thanks to:

We stand on the shoulders of giants.

libevhtp: A more flexible replacement for libevent's httpd API.
LuaJIT: LuaJIT is JIT compiler for the Lua language.
imagemagick: A software suite to create, edit, compose, or convert bitmap images.
hiredis: Hiredis is a minimalistic C client library for the Redis database.
libmemcached: LibMemcached is designed to provide the greatest number of options to use Memcached.

[Optional] For Storage:

memcached: A distributed memory object caching system.
beansdb: Beansdb is a distributed key-value storage system designed for large scale online system, aiming for high avaliablility and easy management.
beanseye: Beanseye is proxy and monitor for beansdb, written in Go.
SSDB: SSDB is a high performace key-value(key-string, key-zset, key-hashmap) NoSQL database, an alternative to Redis.
twemproxy: Twemproxy is a fast and lightweight proxy for memcached and redis protocol.

Documents:

There are several documents to introduce the design and architecture of zimg:
Documents of zimg
And this picture below shows the architecture of zimg's storage:

architecture_of_zimg_v3

Download:

The source code is licensed under a BSD-like License.
All versions on Github.

Feedback:

If you have any question, please submit comment in my BLOG or mention me on Weibo, twitter.
Technical issues are also welcomed to be submitted on GitHub Issues.