Imagor支持 Docker 的图像处理服务器

联合创作 · 2023-09-29 15:40

Imagor 是一个用 Go 和 libvips 编写的快速、支持 Docker 的图像处理服务器,使用 Thumbor URL 语法。

Imagor使用的是最高效的图像处理库libvips(含govips)之一。它通常比使用最快速的ImageMagick和GraphicsMagick设置要快4-8倍。

Imagor是一个易于扩展的Go库,可以在任何Unix环境下安装和使用,并且可以使用Docker进行容器化。

Imagor采用了Thumbor的URL语法,涵盖了大部分的网络图像处理用例。如果这些符合你的要求,Imagor将是一个轻量级的、高性能的替代者。

Quick Start

docker run -p 8000:8000 shumc/imagor -imagor-unsafe

尝试以下图片网址:

# original images
https://raw.githubusercontent.com/golang-samples/gopher-vector/master/gopher.png
https://raw.githubusercontent.com/golang-samples/gopher-vector/master/gopher-front.png

http://localhost:8000/unsafe/500x500/top/https://raw.githubusercontent.com/golang-samples/gopher-vector/master/gopher.png
http://localhost:8000/unsafe/fit-in/500x500/filters:fill(white):format(jpeg)/raw.githubusercontent.com/golang-samples/gopher-vector/master/gopher.png
http://localhost:8000/unsafe/fit-in/-500x500/filters:hue(290):saturation(100):fill(yellow):format(jpeg):quality(80)/raw.githubusercontent.com/golang-samples/gopher-vector/master/gopher.png
http://localhost:8000/unsafe/fit-in/800x800/filters:fill(white):watermark(raw.githubusercontent.com/golang-samples/gopher-vector/master/gopher-front.png,repeat,bottom,10):format(jpeg)/raw.githubusercontent.com/golang-samples/gopher-vector/master/gopher.png
浏览 6
点赞
评论
收藏
分享

手机扫一扫分享

编辑
举报
评论
图片
表情
推荐
点赞
评论
收藏
分享

手机扫一扫分享

编辑
举报