buaazp / zimg Goto Github PK
View Code? Open in Web Editor NEWA lightweight and high performance image storage and processing system.
Home Page: http://zimg.buaa.us
License: BSD 3-Clause "New" or "Revised" License
A lightweight and high performance image storage and processing system.
Home Page: http://zimg.buaa.us
License: BSD 3-Clause "New" or "Revised" License
If you installed more than one version of openssl library. CmakeList.txt in zimg cannot fit it correctly.
For example, CentOS has a low version openssl (found version "0.9.8e-rhel5") which cannot be used for build libevhtp. Then you install a new openssl by sourcecode. Error happens like this:
Scanning dependencies of target zimg
Linking C executable zimg
/usr/bin/ld: skipping incompatible /usr/lib/libssl.so when searching for -lssl
/usr/bin/ld: skipping incompatible /usr/lib/libssl.a when searching for -lssl
/usr/bin/ld: skipping incompatible /usr/lib/libcrypto.so when searching for -lcrypto
/usr/bin/ld: skipping incompatible /usr/lib/libcrypto.a when searching for -lcrypto
/usr/bin/ld: skipping incompatible /usr/lib/liblua-5.1.so when searching for -llua-5.1
/usr/bin/ld: skipping incompatible /usr/lib/libm.so when searching for -lm
/usr/bin/ld: skipping incompatible /usr/lib/libm.a when searching for -lm
/usr/bin/ld: skipping incompatible /usr/lib/libpthread.so when searching for -lpthread
/usr/bin/ld: skipping incompatible /usr/lib/libpthread.a when searching for -lpthread
/usr/bin/ld: skipping incompatible /usr/lib/libc.so when searching for -lc
/usr/bin/ld: skipping incompatible /usr/lib/libc.a when searching for -lc
/usr/local/lib/libevhtp.a(evhtp.c.o): In function `evhtp_ssl_init':
evhtp.c:(.text+0x1018): undefined reference to `EC_KEY_new_by_curve_name'
evhtp.c:(.text+0x1040): undefined reference to `EC_KEY_free'
/usr/local/lib/libevhtp.a(evhtp.c.o): In function `_evhtp_ssl_servername':
evhtp.c:(.text+0x4f7e): undefined reference to `SSL_get_servername'
evhtp.c:(.text+0x501c): undefined reference to `SSL_set_SSL_CTX'
/usr/local/lib/libevhtp.a(evhtp.c.o): In function `_evhtp_request_parser_hostname':
evhtp.c:(.text+0x5c99): undefined reference to `SSL_get_servername'
collect2: ld returned 1 exit status
make[2]: *** [zimg] Error 1
make[1]: *** [CMakeFiles/zimg.dir/all] Error 2
make: *** [all] Error 2
我用php curl上传图片成功了,可一直返回html格式,根据文档说的row_post方式,可查询资料php里面没有这个,一直尝试了多次,还是没有成功,特此求解,希望作者能提供几门语言的api上传接口,目前只提供一些curl命令行接口,谢谢
An extra null pointer check is not needed in functions like the following.
在客户端上传文件后,返回的值包除了mds还包含其它内容,要获取md5的话还需要另外解析,也稍微的多占用了一些流量,如果要是能单出一个专门的上传接口供客户端调用那就太好了
Can it be developed further into a file hosting/storage solution?
When is the user authentication coming?
Hi,
We will use zimg in our project. We want to use beansdb as storage. We use two beanseye (IP : 192.168.1.1 and 192.168.1.2) and 4 beansdb(192.168.1.3-192.168.1.6) . Each beanseye proxy 2 beansdb.I saw your testing result about beansdb.I think that you must konw about beanseye config options clearly. but I don't know how to set some options in the yaml file about beanseye . the fllowing is beanseye config content:
servers:
I could set :
servers:
192.168.1.3:7900
192.168.1.4 : 7900
My question is : how to set the servers options like '127.0.0.1:7900 A -1 B' ? how to set '0 1 2' and 'A -1 B' ? So that let the two beansdb backup each other like your architecture .
Thanks !
Hi,
we want to use zimg server, and want to use beansdb. We found that there are two proxy from the architecture of zimg's storage .One is tewmproxy,and another is beanseye. Could we only use twemproxy ?Because that I think that two proxy will make the program slowly. What is the function of the beanseye?
zimg在设计开发阶段需求基本是我一个毫无实战经验的人凭空想出来的,用起来肯定各种不顺手,所以开一个issue,如果你期望在使用zimg的任何环节增加功能,请在此处回复,我将酌情加入。
I used ab for the upload function on the stress tests. I found that the ab can upload the same img file to the zimg server. like fllowing :
./ab -p "/home/eyes/1.gif" -T "gif" -n 100 -c 10 http://127.0.0.1:4869/upload
I found that I noly upload the same 1.gif 100 times to the zimg server. Is it right for the stress tests? So my question :
I find that include guards like "ZDB_H" and "ZLOG_H" are too short for the safe reuse of your header files.
How do you think about to make them unique by appending a kind of UUID?
hello~我在 ubuntu server 12.04 以及 centos6 编译源码都遇到了类似于下边的问题
fatal error: wand/MagickWand.h: No such file or directory
imagemagick 我是按照官网编译源码安装的,我将Makefile修改一下之后可以正常编译: https://github.com/amyangfei/zimg/blob/modify_makefile/Makefile , 主要改了
LIBS = -levent -levent_openssl -levent_pthreads -lssl -lcrypto -levhtp **-lMagickWand-6.Q16** -lmemcached
想请问你的开发环境里是不是export了环境变量和库的软链接,譬如
export C_INCLUDE_PATH=/usr/local/include/ImageMagick-6
ln -s /usr/local/lib/libMagickWand-6.Q16.so /usr/local/lib/libMagickWand.so
谢谢 :)
Like the title .And If I upload the picture agein ,and no error happed.
Hi,
We don't understand how to set the followiing config options which are in the zimg.lua file :
thread_num = 4
backlog_num = 1024
max_keepalives = 1
retry = 3
Could you tell us what the config options means?
OS env: Redhat 6.5
按照文档上的内容把Zimg 2.0安装好之后,在index.html里上传图片的实惠报以下的错误:
[root@156 bin]# ./zimg conf/zimg.lua
*** glibc detected *** ./zimg: corrupted double-linked list: 0x00007f7e24001380 ***
======= Backtrace: =========
/lib64/libc.so.6[0x3063676166]
/lib64/libc.so.6[0x3063678ef4]
./zimg(event_mm_free_+0x36)[0x43897e]
./zimg(evbuffer_decref_and_unlock_+0x1d1)[0x4222f2]
./zimg(evbuffer_free+0x3e)[0x422335]
./zimg[0x417648]
./zimg(evhtp_connection_free+0x16)[0x4177f6]
./zimg(bufferevent_run_writecb_+0xa2)[0x42981b]
./zimg[0x42e333]
./zimg[0x42e83c]
./zimg[0x432b9a]
./zimg[0x432e6b]
./zimg[0x43349f]
./zimg(event_base_loop+0x2a8)[0x433ba4]
./zimg[0x414352]
/lib64/libpthread.so.0[0x3063e079d1]
/lib64/libc.so.6(clone+0x6d)[0x30636e8b6d]
The function "LOG_PRINT" does not belong to the list of async-signal-safe functions.
I guess that a different program design will be needed for your function "sighandler".
I have looked at a few source files for your current software. I have noticed that some checks for return codes are missing.
Would you like to add more error handling for return values from functions like the following?
这是虾米情况。。。。
<title>Love is Eternal</title>I want to use zimg cluster. I used 3 zimg servers and used 3 local disk to store imgs.It means that one zimg server has one disk. After I knowed about the design and architecture of zimg ,I have some questions:
4.The beansdb supports memcached protocol, it means that I could use memcaced instand of it ,isn't it? The SSDB supports redis protocol ,it means that I could use redist instand of it ,isn't it?
5. Do you have some good ideas about the zimg cluster? So that let the server is stronger and better.
2014/12/05 23:10:50:801456 [DEBUG] Method: 0
2014/12/05 23:10:50:801544 [DEBUG] Got a GET request for </d79054e005f243af95aa37ae9596cf64>
2014/12/05 23:10:50:801572 [DEBUG] md5 of request is <d79054e005f243af95aa37ae9596cf64>
2014/12/05 23:10:50:801599 [DEBUG] get_img() start processing zimg request...
2014/12/05 23:10:50:801859 [DEBUG] Beansdb Result: NOT FOUND
2014/12/05 23:10:50:801898 [DEBUG] key: d79054e005f243af95aa37ae9596cf64 is not exist!
2014/12/05 23:10:50:801925 [DEBUG] Image [d79054e005f243af95aa37ae9596cf64] is not existed.
2014/12/05 23:10:50:801947 [DEBUG] zimg Requset Get Image[MD5: d79054e005f243af95aa37ae9596cf64] Failed!
2014/12/05 23:10:50:801969 [ERROR] 122.92.36.213 fail pic:d79054e005f243af95aa37ae9596cf64 w:640 h:0 p:1 g:0 x:-1 y:-1 r:0 q:90 f:jpeg
2014/12/05 23:10:50:802008 [DEBUG] ============get_request_cb() ERROR!===============
请问这是什么原因导致的,该如何预防,今天重新上传后,可以上传成功。
在url中可以使用p=1或者p=2来设置处理方式,
那么在脚本中如何使用什么参数?
系统是ubuntu 14.04(虚拟机),package 安装了 openssl libevent-dev cmake imagemagick libmagickwand-dev libmemcached-dev build-essential
编译:
cd zimg
make
错误:
Linking C executable zimg
/usr/bin/ld: CMakeFiles/zimg.dir/lua/lmathlib.c.o: undefined reference to symbol 'fmod@@GLIBC_2.2.5'
//lib/x86_64-linux-gnu/libm.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[3]: *** [zimg] Error 1
make[3]: Leaving directory `/home/xinchenm/zimg/build/zimg'
make[2]: *** [CMakeFiles/zimg.dir/all] Error 2
make[2]: Leaving directory `/home/xinchenm/zimg/build/zimg'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/xinchenm/zimg/build/zimg'
cp: cannot stat ‘zimg’: No such file or directory
make: *** [all] Error
不知道是不是自己的环境配置的有问题?好像是link不上math库..
$ cd zimg
$ sudo make # then show errors...
-- Configuring incomplete, errors occurred!
make[1]: Entering directory `/root/zimg/build/zimg'
make[1]: *** No targets specified and no makefile found. Stop.
make[1]: Leaving directory `/root/zimg/build/zimg'
cp: cannot stat `zimg': No such file or directory
make: *** [all] Error 1
Hi,
I will use the zimg sever . I want to use the second storage method which is stotaging imgs into beansdb . Could I use memcached cluster when using the beansdb at the same time?
This software is written in C,not written by C.
您好,zimg上传图片都会产生一个新的url。当用于用户头像存储的时候,外部系统需要链接到这个头像的地址。如果更改了用户头像图片,外部系统无法随之更新,造成一定困扰。能否在下个版本考虑下这种问题呢?比如在上传图片的时候固定一个名称,通过名称也可以访问这个图片,通过md5也可以访问这个图片。
Since the focus of the project seems to be on speed and size it might be a good idea to investigate porting to http://www.graphicsmagick.org/index.html since they're very frequently updated, have public source control, and are specifically focusing on performance and stability. One thing to watch out for is the API, there might be some things that GM doesn't implement.
I really like zimg just that the authentication...
would like the lua script to detect cookies... if cookies match, then allow upload. that's all, returning the filenames of the uploaded data to server.
上面的是一张破损的图片.
命令行中输出错误栈信息
*** glibc detected *** ./zimg: double free or corruption (out): 0x00007f4c60000020 ***
======= Backtrace: =========
/lib64/libc.so.6(+0x760e6)[0x7f4c77f0f0e6]
/lib64/libc.so.6(+0x78c13)[0x7f4c77f11c13]
./zimg(get_img+0x460)[0x409160]
./zimg(send_document_cb+0x751)[0x40cf21]
./zimg[0x4119b0]
./zimg(htparser_run+0xbfb)[0x41642b]
./zimg[0x412b61]
/usr/local/lib/libevent-2.0.so.5(+0x19ee5)[0x7f4c79027ee5]
/usr/local/lib/libevent-2.0.so.5(event_base_loop+0x53c)[0x7f4c7901fe0c]
./zimg[0x40f3a2]
/lib64/libpthread.so.0(+0x7851)[0x7f4c78233851]
/lib64/libc.so.6(clone+0x6d)[0x7f4c77f8190d]
======= Memory map: ========
00400000-00455000 r-xp 00000000 fd:02 50727537 /home/zimg/zimg/bin/zimg
00655000-00656000 rw-p 00055000 fd:02 50727537 /home/zimg/zimg/bin/zimg
00656000-00657000 rw-p 00000000 00:00 0
01f26000-01f47000 rw-p 00000000 00:00 0 [heap]
7f4c58000000-7f4c58021000 rw-p 00000000 00:00 0
7f4c58021000-7f4c5c000000 ---p 00000000 00:00 0
7f4c60000000-7f4c60087000 rw-p 00000000 00:00 0
请教buaazp:
我需要将flash跨域策略文件 crossdomain.xml 存放在Zimg服务器的HTTP根目录,要确保flash通过“http://www.xxx.com/crossdomain.xml”的方式能获取到,实现数据的跨域传输,请问应该放在“/root/zimg/bin/www”里面吗?谢谢。。。。
Possibly add one time urls or urls with time based expiry for image download.
Gwan.com
请求这样一个链接
http://myhost:4869/83ebab5a10269995d230a2a0a26c1791?w=300&h=300
发生如下错误:
*** glibc detected *** ./zimg: double free or corruption (out): 0x00007fdb08000020 ***
======= Backtrace: =========
/lib64/libc.so.6(+0x76166)[0x7fdb1debc166]
/lib64/libc.so.6(+0x78ca3)[0x7fdb1debeca3]
./zimg(get_img+0x460)[0x40df40]
./zimg(send_document_cb+0x751)[0x409ce1]
./zimg[0x4119c0]
./zimg(htparser_run+0xbfb)[0x41643b]
./zimg[0x412b71]
/usr/local/lib/libevent-2.0.so.5(+0x19ee5)[0x7fdb1efc2ee5]
/usr/local/lib/libevent-2.0.so.5(event_base_loop+0x53c)[0x7fdb1efbae0c]
./zimg[0x40f3b2]
/lib64/libpthread.so.0(+0x79d1)[0x7fdb1e1e19d1]
/lib64/libc.so.6(clone+0x6d)[0x7fdb1df2eb7d]
======= Memory map: ========
00400000-00455000 r-xp 00000000 ca:01 417831 /root/soft/zimg/bin/zimg
00655000-00656000 rw-p 00055000 ca:01 417831 /root/soft/zimg/bin/zimg
00656000-00657000 rw-p 00000000 00:00 0
01401000-01422000 rw-p 00000000 00:00 0 [heap]
7fdb08000000-7fdb080b2000 rw-p 00000000 00:00 0
7fdb080b2000-7fdb0c000000 ---p 00000000 00:00 0
7fdb0c000000-7fdb0c021000 rw-p 00000000 00:00 0
7fdb0c021000-7fdb10000000 ---p 00000000 00:00 0
7fdb10000000-7fdb10021000 rw-p 00000000 00:00 0
7fdb10021000-7fdb14000000 ---p 00000000 00:00 0
7fdb161fd000-7fdb161fe000 ---p 00000000 00:00 0
7fdb161fe000-7fdb16bfe000 rw-p 00000000 00:00 0
7fdb16bfe000-7fdb16bff000 ---p 00000000 00:00 0
7fdb16bff000-7fdb175ff000 rw-p 00000000 00:00 0
7fdb175ff000-7fdb17600000 ---p 00000000 00:00 0
7fdb17600000-7fdb18000000 rw-p 00000000 00:00 0
7fdb18000000-7fdb18021000 rw-p 00000000 00:00 0
7fdb18021000-7fdb1c000000 ---p 00000000 00:00 0
7fdb1c376000-7fdb1c377000 ---p 00000000 00:00 0
7fdb1c377000-7fdb1cd77000 rw-p 00000000 00:00 0
7fdb1cd77000-7fdb1ce5f000 r-xp 00000000 ca:01 672480 /usr/lib64/libstdc++.so.6.0.13
7fdb1ce5f000-7fdb1d05f000 ---p 000e8000 ca:01 672480 /usr/lib64/libstdc++.so.6.0.13
7fdb1d05f000-7fdb1d066000 r--p 000e8000 ca:01 672480 /usr/lib64/libstdc++.so.6.0.13
7fdb1d066000-7fdb1d068000 rw-p 000ef000 ca:01 672480 /usr/lib64/libstdc++.so.6.0.13
7fdb1d068000-7fdb1d07d000 rw-p 00000000 00:00 0
7fdb1d07d000-7fdb1d093000 r-xp 00000000 ca:01 729309 /lib64/libgcc_s-4.4.7-20120601.so.1
7fdb1d093000-7fdb1d292000 ---p 00016000 ca:01 729309 /lib64/libgcc_s-4.4.7-20120601.so.1
7fdb1d292000-7fdb1d293000 rw-p 00015000 ca:01 729309 /lib64/libgcc_s-4.4.7-20120601.so.1
7fdb1d293000-7fdb1d2a0000 r-xp 00000000 ca:01 673377 /usr/lib64/libgomp.so.1.0.0
7fdb1d2a0000-7fdb1d49f000 ---p 0000d000 ca:01 673377 /usr/lib64/libgomp.so.1.0.0
7fdb1d49f000-7fdb1d4a0000 rw-p 0000c000 ca:01 673377 /usr/lib64/libgomp.so.1.0.0
7fdb1d4a0000-7fdb1d4b5000 r-xp 00000000 ca:01 729151 /lib64/libz.so.1.2.3
7fdb1d4b5000-7fdb1d6b4000 ---p 00015000 ca:01 729151 /lib64/libz.so.1.2.3
7fdb1d6b4000-7fdb1d6b5000 r--p 00014000 ca:01 729151 /lib64/libz.so.1.2.3
7fdb1d6b5000-7fdb1d6b6000 rw-p 00015000 ca:01 729151 /lib64/libz.so.1.2.3
7fdb1d6b6000-7fdb1d997000 r-xp 00000000 ca:01 674700 /usr/local/lib/libMagickCore-6.Q16.so.2.0.0
7fdb1d997000-7fdb1db96000 ---p 002e1000 ca:01 674700 /usr/local/lib/libMagickCore-6.Q16.so.2.0.0
7fdb1db96000-7fdb1dc3c000 rw-p 002e0000 ca:01 674700 /usr/local/lib/libMagickCore-6.Q16.so.2.0.0
7fdb1dc3c000-7fdb1dc3e000 rw-p 00000000 00:00 0
7fdb1dc3e000-7fdb1dc45000 r-xp 00000000 ca:01 729419 /lib64/librt-2.12.so
7fdb1dc45000-7fdb1de44000 ---p 00007000 ca:01 729419 /lib64/librt-2.12.so
7fdb1de44000-7fdb1de45000 r--p 00006000 ca:01 729419 /lib64/librt-2.12.so
7fdb1de45000-7fdb1de46000 rw-p 00007000 ca:01 729419 /lib64/librt-2.12.so
7fdb1de46000-7fdb1dfd1000 r-xp 00000000 ca:01 729100 /lib64/libc-2.12.so
7fdb1dfd1000-7fdb1e1d0000 ---p 0018b000 ca:01 729100 /lib64/libc-2.12.so
7fdb1e1d0000-7fdb1e1d4000 r--p 0018a000 ca:01 729100 /lib64/libc-2.12.so
7fdb1e1d4000-7fdb1e1d5000 rw-p 0018e000 ca:01 729100 /lib64/libc-2.12.so
7fdb1e1d5000-7fdb1e1da000 rw-p 00000000 00:00 0
7fdb1e1da000-7fdb1e1f1000 r-xp 00000000 ca:01 729124 /lib64/libpthread-2.12.so
7fdb1e1f1000-7fdb1e3f1000 ---p 00017000 ca:01 729124 /lib64/libpthread-2.12.so
7fdb1e3f1000-7fdb1e3f2000 r--p 00017000 ca:01 729124 /lib64/libpthread-2.12.so
7fdb1e3f2000-7fdb1e3f3000 rw-p 00018000 ca:01 729124 /lib64/libpthread-2.12.so
7fdb1e3f3000-7fdb1e3f7000 rw-p 00000000 00:00 0
7fdb1e3f7000-7fdb1e3f9000 r-xp 00000000 ca:01 729413 /lib64/libdl-2.12.so
7fdb1e3f9000-7fdb1e5f9000 ---p 00002000 ca:01 729413 /lib64/libdl-2.12.so
7fdb1e5f9000-7fdb1e5fa000 r--p 00002000 ca:01 729413 /lib64/libdl-2.12.so
7fdb1e5fa000-7fdb1e5fb000 rw-p 00003000 ca:01 729413 /lib64/libdl-2.12.so
7fdb1e5fb000-7fdb1e67e000 r-xp 00000000 ca:01 729414 /lib64/libm-2.12.so
7fdb1e67e000-7fdb1e87d000 ---p 00083000 ca:01 729414 /lib64/libm-2.12.so
7fdb1e87d000-7fdb1e87e000 r--p 00082000 ca:01 729414 /lib64/libm-2.12.so
7fdb1e87e000-7fdb1e87f000 rw-p 00083000 ca:01 729414 /lib64/libm-2.12.so
7fdb1e87f000-7fdb1e8ae000 r-xp 00000000 ca:01 674772 /usr/local/lib/libmemcached.so.11.0.0
7fdb1e8ae000-7fdb1eaae000 ---p 0002f000 ca:01 674772 /usr/local/lib/libmemcached.so.11.0.0
7fdb1eaae000-7fdb1eaaf000 rw-p 0002f000 ca:01 674772 /usr/local/lib/libmemcached.so.11.0.0
7fdb1eaaf000-7fdb1eba3000 r-xp 00000000 ca:01 674704 /usr/local/lib/libMagickWand-6.Q16.so.2.0.0
7fdb1eba3000-7fdb1eda3000 ---p 000f4000 ca:01 674704 /usr/local/lib/libMagickWand-6.Q16.so.2.0.0
7fdb1eda3000-7fdb1eda7000 rw-p 000f4000 ca:01 674704 /usr/local/lib/libMagickWand-6.Q16.so.2.0.0
7fdb1eda7000-7fdb1eda9000 r-xp 00000000 ca:01 674752 /usr/local/lib/libevent_pthreads-2.0.so.5.1.9
7fdb1eda9000-7fdb1efa8000 ---p 00002000 ca:01 674752 /usr/local/lib/libevent_pthreads-2.0.so.5.1.9
7fdb1efa8000-7fdb1efa9000 rw-p 00001000 ca:01 674752 /usr/local/lib/libevent_pthreads-2.0.so.5.1.9
7fdb1efa9000-7fdb1efed000 r-xp 00000000 ca:01 674686 /usr/local/lib/libevent-2.0.so.5.1.9
7fdb1efed000-7fdb1f1ec000 ---p 00044000 ca:01 674686 /usr/local/lib/libevent-2.0.so.5.1.9
7fdb1f1ec000-7fdb1f1ee000 rw-p 00043000 ca:01 674686 /usr/local/lib/libevent-2.0.so.5.1.9
7fdb1f1ee000-7fdb1f20e000 r-xp 00000000 ca:01 729479 /lib64/ld-2.12.so
7fdb1f3fc000-7fdb1f3fd000 rw-p 00000000 00:00 0
7fdb1f3fd000-7fdb1f405000 rw-p 00000000 00:00 0
7fdb1f40a000-7fdb1f40b000 rw-p 00000000 00:00 0
7fdb1f40b000-7fdb1f40d000 rw-p 00000000 00:00 0
7fdb1f40d000-7fdb1f40e000 r--p 0001f000 ca:01 729479 /lib64/ld-2.12.so
7fdb1f40e000-7fdb1f40f000 rw-p 00020000 ca:01 729479 /lib64/ld-2.12.so
7fdb1f40f000-7fdb1f410000 rw-p 00000000 00:00 0
7fffbcbd1000-7fffbcbe6000 rw-p 00000000 00:00 0 [stack]
7fffbcbff000-7fffbcc00000 r-xp 00000000 00:00 0 [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]
Inconsistency detected by ld.so: dl-version.c: 224: _dl_check_map_versions: Assertion `needed != ((void *)0)' failed!
包都安装好了,但是build一直这个错
请问一下如何实现URL打水印呢?
Like the title, what can I do next?
一直想有这么个东西,终于发现有人做了。
以前自己的想法是通过nginx来处理,后端让imagemagick去处理图片,终究是C功底不过关,没能实现。。
想问下,zimg请求的md5图片,除了原图,其它条件下的是即时生成响应请求的?还是第一次请求的时候生成,之后的访问直接输出已经生成的?如果是后者,如果控制生成的文件所占的空间?
http://115.28.156.104:4869/bc529fcc6c19079a1bba491e00196b94?w=1080
is smaller than
http://115.28.156.104:4869/bc529fcc6c19079a1bba491e00196b94?w=540
My zimg version is 3.0
(1) supervise run, when crash as online service;
期待支持分布式的ZIMG
[root@ccj zimg]# make
mkdir -p build/zimg
cd build/zimg; cmake /zimg/src; make; cp zimg /zimg/bin
Diabling SSL
Build Type: Release
Std CFLAGS: -Wall -fno-strict-aliasing -DPROJECT_VERSION="2.0.0" -D_BSD_SOURCE -D_POSIX_C_SOURCE=200112 -DEVHTP_DISABLE_SSL -DNDEBUG -DZIMG_VERSION=2.0.0 -DMAGICKCORE_HDRI_ENABLE -DMAGICKCORE_QUANTUM_DEPTH=16
Dbg CFLAGS: -g -Wall -fno-strict-aliasing -ggdb -DDEBUG -DZIMG_VERSION=2.0.0 -DMAGICKCORE_HDRI_ENABLE -DMAGICKCORE_QUANTUM_DEPTH=16
Rel CFLAGS: -O3 -DNDEBUG -Wall -fno-strict-aliasing -DZIMG_VERSION=2.0.0 -DMAGICKCORE_HDRI_ENABLE -DMAGICKCORE_QUANTUM_DEPTH=16
-- Configuring done
-- Generating done
-- Build files have been written to: /zimg/build/zimg
make[1]: Entering directory `/zimg/build/zimg'
make[2]: Entering directory `/zimg/build/zimg'
make[3]: Entering directory `/zimg/build/zimg'
make[3]: Leaving directory `/zimg/build/zimg'
make[3]: Entering directory `/zimg/build/zimg'
Linking C executable zimg
CMakeFiles/zimg.dir/main.c.o: In function `main':
main.c:(.text+0x716): undefined reference to `luaL_loadfilex'
main.c:(.text+0x732): undefined reference to `lua_pcallk'
main.c:(.text+0x747): undefined reference to `lua_getglobal'
main.c:(.text+0x776): undefined reference to `lua_getglobal'
main.c:(.text+0x7a5): undefined reference to `lua_getglobal'
main.c:(.text+0x7d4): undefined reference to `lua_getglobal'
main.c:(.text+0x803): undefined reference to `lua_getglobal'
CMakeFiles/zimg.dir/main.c.o:main.c:(.text+0x832): more undefined references to `lua_getglobal' follow
CMakeFiles/zimg.dir/main.c.o: In function `main':
main.c:(.text+0xdfb): undefined reference to `lua_tonumberx'
main.c:(.text+0xe43): undefined reference to `lua_tonumberx'
main.c:(.text+0xe93): undefined reference to `lua_tonumberx'
main.c:(.text+0xf33): undefined reference to `lua_tonumberx'
main.c:(.text+0xf5b): undefined reference to `lua_tonumberx'
CMakeFiles/zimg.dir/main.c.o:main.c:(.text+0xf83): more undefined references to `lua_tonumberx' follow
collect2: ld returned 1 exit status
make[3]: *** [zimg] Error 1
make[3]: Leaving directory `/zimg/build/zimg'
make[2]: *** [CMakeFiles/zimg.dir/all] Error 2
make[2]: Leaving directory `/zimg/build/zimg'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/zimg/build/zimg'
cp: cannot stat `zimg': No such file or directory
make: *** [all] Error 1
[root@ccj zimg]# gcc --version
gcc (GCC) 4.4.6 20120305 (Red Hat 4.4.6-4)
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
ApplematoMacBook:zimg apple$ make
mkdir -p build/zimg
cd build/zimg; cmake /Users/apple/work/local/zimg/src; make; cp zimg /Users/apple/work/local/zimg/bin
CMake Error at /usr/local/homebrew/Cellar/cmake/3.0.0/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:136 (message):
Could NOT find LibEvent (missing: LIBEVENT_LIBRARY LIBEVENT_INCLUDE_DIR)
Call Stack (most recent call first):
/usr/local/homebrew/Cellar/cmake/3.0.0/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:343 (_FPHSA_FAILURE_MESSAGE)
CMakeModules/FindLibEvent.cmake:17 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
CMakeLists.txt:80 (find_package)
-- Configuring incomplete, errors occurred!
See also "/Users/apple/work/local/zimg/build/zimg/CMakeFiles/CMakeOutput.log".
See also "/Users/apple/work/local/zimg/build/zimg/CMakeFiles/CMakeError.log".
make[1]: *** No targets specified and no makefile found. Stop.
cp: zimg: No such file or directory
make: *** [all] Error 1
2014/04/25 15:09:53:278763 Thread ID: 140074436028160 [INFO] /usr/local/src/zimg/zhttpd.c:215 post_request_cb() Method: 2
2014/04/25 15:09:53:278900 Thread ID: 140074436028160 [INFO] /usr/local/src/zimg/zhttpd.c:262 post_request_cb() boundary Find. boundary = 0xKhTmLbOuNdArY-09BB7BC0-B667-4B30-AE96-8F69FFA5737A
2014/04/25 15:09:53:278929 Thread ID: 140074436028160 [INFO] /usr/local/src/zimg/zhttpd.c:279 post_request_cb() evblen = 8480
2014/04/25 15:09:53:278957 Thread ID: 140074436028160 [INFO] /usr/local/src/zimg/zhttpd.c:281 post_request_cb() rmblen = 8480
2014/04/25 15:09:53:278983 Thread ID: 140074436028160 [INFO] /usr/local/src/zimg/zhttpd.c:296 post_request_cb() boundaryPattern =
--0xKhTmLbOuNdArY-09BB7BC0-B667-4B30-AE96-8F69FFA5737AE, strlen = 58
Hi,
we use zimg server ,and use ssdb with the twemproxy . We found that if the twempxoy process was killed ,and zimg server process was not exsit.
请教楼主
关于zcache.c的缓存模块。
当对某个原图进行裁剪后,裁剪后的小图是被缓存的,缓存的形式是什么?直接缓存文件还是将文件保存到硬盘上,缓存里面只存储地址。
如果是将加工的图片保存到磁盘上的话,那么这些文件需要删除吗?删除的策略是什么?
Hi, when I uploading three imgs at the same times , the zimg server opened one connection to operate the 3 imgs then closed when finishing ? Or create one new connection for one img (upload three imgs opened three connections)?
In some system there is a warning like this:
AcquireResizeFilter: Assertion `UndefinedFilter < filter && filter < SentinelFilter' failed.
问个新手问题,怎么把包include进去编译?
我make的时候遇到这个问题:(依赖的库在zimg的同级目录)
“./zhttpd.h:25:10: fatal error: 'evhtp.h' file not found”
之前只用java,最近用go。没有用过c的依赖库编译。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.