https://xxyh.xiaoli.icu/api/p_gray_image.phphttps://xxyh.xiaoli.icu/api/p_gray_image.php?url=https%3A%2F%2Fexample.com%2Fa.jpg&amount=100&w=800传入公网图片直链,返回应用了去饱和滤镜的 SVG 版图片,可调 amount(0~100,100 为全灰)。
用 SVG 滤镜实现,不落盘、不依赖 GD;客户端渲染时按 URL 加载原图。适合做占位图、对比图与低干扰背景。
| 参数名 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
url |
string | 必填 | https://example.com/a.jpg | 公网图片直链 |
amount |
int | 选填 | 100 | 灰度强度 0~100,默认 100 |
w |
int | 选填 | 800 | 输出宽度,默认 800 |
h |
int | 选填 | — | 输出高度,不传按 2:3 估算 |
https://xxyh.xiaoli.icu/api/p_gray_image.php
此处将显示接口返回结果…
返回图片二进制或 SVG 源码(Content-Type 为 image/svg+xml 或 image/png),不是 JSON。
—