nginx快速绘制圆形图(ngx_http_circle_gif_module模块)

凉白开 Nginx321,456字数 989阅读3分17秒阅读模式

nginx官网上有各式各样的第三方模块,今天来介绍一款叫做ngx_http_circle_gif_module。从字面意思来看,他是一个声称圆形图片的模块,实际上也是如此。此模块生成图片比直接在硬盘上读取要快很多,并且可以不用劳烦美工去设计。或者说不用麻烦同学用windows下的画图去话一个圆.功能很简单,指令也很简单。

安装模块参数

--add-module=path/to/circle_gif/directory

具体方法就不在讲述了,可以参考运维生存时间的《如何安装nginx第三方模块文章源自运维生存时间-https://www.ttlsa.com/nginx/nginx-modules-ngx_http_circle_gif_module/

circle_gif指令
circle_gif
语法: circle_gif
默认值: n/a
配置段: location文章源自运维生存时间-https://www.ttlsa.com/nginx/nginx-modules-ngx_http_circle_gif_module/

circle_gif_min_radius
语法: circle_min_radius
默认值: 10
配置段: location
圆形的最小半径, 单位为像素文章源自运维生存时间-https://www.ttlsa.com/nginx/nginx-modules-ngx_http_circle_gif_module/

circle_gif_max_radius
语法: circle_max_radius
默认值: 20
配置段: location
圆形的最大半径,  单位为像素文章源自运维生存时间-https://www.ttlsa.com/nginx/nginx-modules-ngx_http_circle_gif_module/

circle_gif_step_radius
语法: circle_step_radius
默认值: 2
配置段: location
The "step" in between generated circle images文章源自运维生存时间-https://www.ttlsa.com/nginx/nginx-modules-ngx_http_circle_gif_module/

circle_gif配置

location /ttlsa_circles {
circle_gif;
}文章源自运维生存时间-https://www.ttlsa.com/nginx/nginx-modules-ngx_http_circle_gif_module/

circle_gif用法

<背景颜色>/<前景色>/<半径>.gif文章源自运维生存时间-https://www.ttlsa.com/nginx/nginx-modules-ngx_http_circle_gif_module/

例子
http://test.ttlsa.com/ttlsa_circles/ffffff/000000/20.gif文章源自运维生存时间-https://www.ttlsa.com/nginx/nginx-modules-ngx_http_circle_gif_module/

ffffff:背景色是白色
000000:前景色是黑色
20:圆形半径为20文章源自运维生存时间-https://www.ttlsa.com/nginx/nginx-modules-ngx_http_circle_gif_module/

circle_gif效果图

circle_gif

circle_gif

 文章源自运维生存时间-https://www.ttlsa.com/nginx/nginx-modules-ngx_http_circle_gif_module/

参考地址

nginx_circle_gif下载:https://github.com/evanmiller/nginx_circle_gif/文章源自运维生存时间-https://www.ttlsa.com/nginx/nginx-modules-ngx_http_circle_gif_module/

nginx_circle_gif文档:http://wiki.nginx.org/HttpCircleGifModule文章源自运维生存时间-https://www.ttlsa.com/nginx/nginx-modules-ngx_http_circle_gif_module/

站点:运维生存时间   网址:https://www.ttlsa.com/html/3942.html文章源自运维生存时间-https://www.ttlsa.com/nginx/nginx-modules-ngx_http_circle_gif_module/ 文章源自运维生存时间-https://www.ttlsa.com/nginx/nginx-modules-ngx_http_circle_gif_module/

weinxin
我的微信
微信公众号
扫一扫关注运维生存时间公众号,获取最新技术文章~
凉白开
  • 本文由 发表于 11/12/2013 11:52:19
  • 转载请务必保留本文链接:https://www.ttlsa.com/nginx/nginx-modules-ngx_http_circle_gif_module/
  • circle_gif
  • nginx
  • nginx模块
  • ngx_http_circle_gif_module
评论  3  访客  1
    • […] 14. nginx不记录特定日志(access_log_bypass_if) 15. nginx快速绘制圆形图(ngx_http_circle_gif_module模块) 16. nginx实现大小写字母转换(ngx_http_lower_upper_case模块) 17. […]

    评论已关闭!