{"id":37166055,"url":"https://github.com/loveczp/fqimg","last_synced_at":"2026-01-14T19:40:37.159Z","repository":{"id":73049007,"uuid":"54764631","full_name":"loveczp/fqimg","owner":"loveczp","description":"FQimg,  an image server","archived":false,"fork":false,"pushed_at":"2023-05-31T03:18:02.000Z","size":431,"stargazers_count":11,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-06-20T11:13:13.405Z","etag":null,"topics":["http-server","image","image-processing"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/loveczp.png","metadata":{"files":{"readme":"README-cn.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-03-26T05:33:37.000Z","updated_at":"2023-05-31T03:11:49.000Z","dependencies_parsed_at":"2024-06-20T10:36:41.151Z","dependency_job_id":null,"html_url":"https://github.com/loveczp/fqimg","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/loveczp/fqimg","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loveczp%2Ffqimg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loveczp%2Ffqimg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loveczp%2Ffqimg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loveczp%2Ffqimg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/loveczp","download_url":"https://codeload.github.com/loveczp/fqimg/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loveczp%2Ffqimg/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28432677,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T18:57:19.464Z","status":"ssl_error","status_checked_at":"2026-01-14T18:52:48.501Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["http-server","image","image-processing"],"created_at":"2026-01-14T19:40:36.356Z","updated_at":"2026-01-14T19:40:37.133Z","avatar_url":"https://github.com/loveczp.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FQimg \n\n先来体验一下把  \nhttp://loveczp.github.io/fqimg/\n\n这是一个用go语言写的实时图片服务器\n有如下特性\n* 动态处理图片。在请求的url上加上不同的尺寸参数就可以得到不同的尺寸的图片。\n* 链式图片处理。对一个图片进行多重处理，这和unix的pipeline很类似。\n* 高性能。得益于go语言的并发特性，此图片服务器的内存，cpu占用都很低，能同时处理的图片数量也很可观。\n* webp图片格式支持。webp比之于jpeg，能更好的压缩图片的存储和传输体积，这点对移动应用尤为重要。\n* 部署简单，只有一个可执行文件，不依赖任何外部运行库，只需将可执行文件拷贝到服务器即可执行。\n* 支持多种输出格式和输出质量。当前能够支持jpeg，gif，png，bmp，webp格式，对于jpeg，gif，webp还能够支持自定义输出图片质量。\n* 支持本地文件缓存，极大提高性能。\n* 支持上传控制，确保只有可信IP才能上传。\n* 支持跨域上传。\n* 支持http 和 https\n* 支持两种存储后端，本地文件， [seaweeddfs](https://github.com/chrislusf/seaweedfs)\n\n# 示例 \n* **原图如下**  \nhttps://fqimg.com/get/0657cae447e8c88f44c65b7e5f73cfe0\n\n* **动态剪裁的例子**  \n动态剪裁成400*400的图如下，当然高宽值可以设置成我们需要的任意值  \nhttps://fqimg.com/get/0657cae447e8c88f44c65b7e5f73cfe0?fill=400_400\n\n* **链式处理的例子**  \n可以把图片裁剪成400*400后，还可以进行灰度处理。如下  \nhttps://fqimg.com/get/0657cae447e8c88f44c65b7e5f73cfe0?fit=200_300\u0026grayscale\n\n* **webp处理的例子。如下**  \nhttps://fqimg.com/get/0657cae447e8c88f44c65b7e5f73cfe0?webp=50\n\n\n\n\n\n# 文档。 \n* 安装及运行 \n    ```bash\n    go get github.com/loveczp/fqimg\n    ```\n    注意:\n    * 在windows上务必安装\u003ca href=\"http://tdm-gcc.tdragon.net/download\"\u003etdm-gcc\u003c/a\u003e否则无法编译安装通过\n    * go 版本必须大于等于1.8\n\n    然后运行\n    ```bash\n    fqimg -c=path/to/config/file\n    ```\n\n* 图片上传 \n   ```bash\n    curl -F \"file=@xxxxx.jpg\" \"http://fqimg.com/put\"\n   ```\n    把xxxx.jpg和fqimg.com换成你对应的信息可以得到如下结果。  \n    [\"https://fqimg.com/get/0657cae447e8c88f44c65b7e5f73cfe0\"]  \n    md5就是文件对应的MD5码，系统也是用这个来定位上传的文件。\n\n    访问该文件方法如下\n    https://fqimg.com/get/0657cae447e8c88f44c65b7e5f73cfe0\n\n\n\n* 3.图片操作 \n    * 每一个图片操作就是一个处理命令，命令有0个或者多个参数，参数包含参数名和参数值。参数是以url的参数的方式放在url尾部。即？后面就是参数。  \n    例如  \n    https://fqimg.com/get/0657cae447e8c88f44c65b7e5f73cfe0?fit=200_300  \n    上面的命令表示对图片进行fit压缩，使图片能够容纳在一个200*300的框内。命令是fit。对应的参数是高和宽。\n\n    * 命令之间可以通过连接符号“\u0026”把多个命令连接起来实现多重操作。\n    例如  \n    https://fqimg.com/get/0657cae447e8c88f44c65b7e5f73cfe0?fit=200_300\u0026grayscale\n    上面表示先推图像进行fit压缩操作，然后对操作后的结果进行灰度化 处理。\n\n\n\n\n# 命令列表\n\n| 命令名称  |  命令格式 | 例子  | 结果  |\n|---|---|---|---|\n|fit|fit=width_height\u003cbr\u003efit=width_height_filter|        fit=100_300\u003cbr/\u003efit=100_300_box\u003cbr\u003e fit模式裁剪|![](http://fqimg.com/get/0657cae447e8c88f44c65b7e5f73cfe0?fit=150_150) |\n|       fill|        fill=width_height\u003cbr\u003efill=width_height_filter\u003cbr\u003efill=width_height_filter_anchor|        fill=100_300\u003cbr/\u003efill=100_300_box\u003cbr/\u003efill=100_300_box_top\u003cbr\u003efill模式裁剪|        ![](http://fqimg.com/get/0657cae447e8c88f44c65b7e5f73cfe0?fill=150_150) |\n|       resize|        resize=width_height\u003cbr\u003eresize=width_height_filter|        resize=100_300\u003cbr/\u003eresize=100_300_box\u003cbr\u003e  resize模式裁剪|![](http://fqimg.com/get/0657cae447e8c88f44c65b7e5f73cfe0?resize=150_150) |\n|       gamma|        gamma\u003cbr\u003egamma=stength|        gamma\u003cbr\u003egamma=234|        ![](http://fqimg.com/get/0657cae447e8c88f44c65b7e5f73cfe0?fill=150_150\u0026gamma=10) |\n|       contrast|        contrast\u003cbr\u003econtrast=stength|        contrast\u003cbr\u003econtrast=20\u003cbr\u003e 增加对比度|    ![](http://fqimg.com/get/0657cae447e8c88f44c65b7e5f73cfe0?fill=150_150\u0026contrast=120) |\n|       brightness|        brightness\u003cbr\u003ebrightness=stength|         brightness\u003cbr\u003ebrightness=0.5\u003cbr\u003e增加亮度 |    ![](http://fqimg.com/get/0657cae447e8c88f44c65b7e5f73cfe0?fill=150_150\u0026brightness=38) |\n|       grayscale|        grayscale|        grayscale\u003cbr\u003e变成灰度图 |    ![](http://fqimg.com/get/0657cae447e8c88f44c65b7e5f73cfe0?fill=150_150\u0026grayscale) |\n|       invert|        invert|        invert\u003cbr\u003e反相 |    ![](http://fqimg.com/get/0657cae447e8c88f44c65b7e5f73cfe0?fill=150_150\u0026invert) |\n|       blur|        blur\u003cbr\u003eblur=stength|        blur\u003cbr\u003eblur=3.5\u003cbr\u003e模糊|    ![](http://fqimg.com/get/0657cae447e8c88f44c65b7e5f73cfe0?fill=150_150\u0026blur=3.5) |\n|       sharpen|        sharpen\u003cbr\u003esharpen=stength|        sharpen\u003cbr\u003esharpen=3.5\u003cbr\u003e锐化|    ![](http://fqimg.com/get/0657cae447e8c88f44c65b7e5f73cfe0?fill=150_150\u0026sharpen=65) |\n|       rotate90|        rotate90|        rotate90 正向旋转90度 |    ![](http://fqimg.com/get/0657cae447e8c88f44c65b7e5f73cfe0?fill=150_150\u0026rotate90) |\n|       rotate180|        rotate180|        rotate180正向旋转180度|    ![](http://fqimg.com/get/0657cae447e8c88f44c65b7e5f73cfe0?fill=150_150\u0026rotate180) |\n|       rotate270|        rotate270|        rotate270正向旋转270度|    ![](http://fqimg.com/get/0657cae447e8c88f44c65b7e5f73cfe0?fill=150_150\u0026rotate270) |\n|       flipH|        flipH|        flipH水平翻转|    ![](http://fqimg.com/get/0657cae447e8c88f44c65b7e5f73cfe0?fill=150_150\u0026flipH) |\n|       flipV|        flipV|        flipV水平翻转|    ![](http://fqimg.com/get/0657cae447e8c88f44c65b7e5f73cfe0?fill=150_150\u0026flipV) |\n|       webp|        webp\u003cbr\u003ewebp=quality|         webp\u003cbr\u003ewebp=80\u003cbr/\u003e用80%的质量输出成webp格式|    ![](http://fqimg.com/get/0657cae447e8c88f44c65b7e5f73cfe0?fill=150_150\u0026webp=80) |\n|       jpeg|        jpeg\u003cbr\u003ejpeg=quality|        jpeg\u003cbr\u003ejpeg=80\u003cbr/\u003e用80%的质量输出成jpeg格式|    ![](http://fqimg.com/get/0657cae447e8c88f44c65b7e5f73cfe0?fill=150_150\u0026jpeg=80) |\n|       png|        png|        png 输出成png格式|    ![](http://fqimg.com/get/0657cae447e8c88f44c65b7e5f73cfe0?fill=150_150\u0026png) |\n|       gif|        gif\u003cbr\u003egif=num\u003cbr\u003enum为颜色数量|        png\u003cbr\u003epng=128\u003cbr\u003e 输出成128色的gif格式|    ![](http://fqimg.com/get/0657cae447e8c88f44c65b7e5f73cfe0?fill=150_150\u0026gif=64) |\n|       mark|        mark=mid\u003cbr\u003emark=mid_offx_offy\u003cbr\u003emark=mid_offx_offy_offp\u003cbr\u003emark=mid_offx_offy_offp_alpha\u003cbr\u003e加水印 mid为配置文件中mark部分左边的key|        mark=a\u003cbr\u003emark=a_10_10\u003cbr\u003emark=a_10_10_lu\u003cbr\u003emark=a_10_10_lu_255|    ![](http://fqimg.com/get/0657cae447e8c88f44c65b7e5f73cfe0?fill=150_151\u0026mark=a) |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floveczp%2Ffqimg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Floveczp%2Ffqimg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floveczp%2Ffqimg/lists"}