图像服务image server


原文链接: 图像服务image server

格式转换Transform 缩放resize Fit 剪裁crop 旋转rotate 质量quality 翻转Flip 放大upscale

Search · image server
www.imageflow.io

wantedly/nginx-image-server: Dockerfile for Dynamic Image Transformation Server with Nginx and Small Light module

Introduction to picfit, an image resizing server written in Go – Medium
thoas/picfit: An image resizing server written in Go

{
  "storage": {
    "src": {
      "type": "[STORAGE]"
    }
  },
  "options": {
    "enable_upload": true
  }
}
1. storage.src 指定根目录 path以此为根目录
2. options.enable_upload 允许上传

form表单上传文件

curl -F data=@9.jpg -i localhost:3001/upload

General image 请求地址

http://localhost:3001/display?url=http://i1.piimg.com/585302/243d3a3c97d7877a.png&w=600&h=0&op=resize&upscale=0
http://localhost:3001/display/resize/1000x1000/src/2017-02-12-132835_498x284_scrot.png

http://localhost:3001/{method}?url={url}&path={path}&w={width}&h={height}&upscale={upscale}&sig={sig}&op={operation}&fmt={format}&q={quality}&deg={degree}&pos={position}
方法{method} :Display Redirect Get Upload
操作Operations :Resize Thumbnail Flip Rotate

  1. path | url
  2. width & height
  3. upscale 放大
    quality jpeg质量
    degree 角度 90 180 270 rotate有效
    position 翻转参考点 flip 有效
`