# 图像锐化

> 使用 sharp 或 usm 参数提高图片的清晰度。

## 参数说明

> **Warning**
>
> 该方法只能用于静态图片

| 参数       | 含义                          | 默认值 | 取值       |
| :------- | --------------------------- | :-: | -------- |
| `sharp`  | **锐化强度**。值越大越锐利，过大会失真       |  0  | 0 \~ 500 |
| `usm`    | **USM 锐化强度**                |  0  | 0 \~ 100 |
| `usmrad` | **USM 锐化半径**，单位像素，需配合 `usm` | 2.5 | 0 \~ 500 |

两种方式的选择：

- **`sharp`**：一个参数即可，适合缩略图的常规提锐。
- **`usm`**：专业修图中常用的 USM 锐化，可通过半径控制作用范围。小半径强调细节纹理，大半径增强整体轮廓对比。

## 效果演示

原始清晰度：

![原图](https://demo.bitiful.com/girl.jpeg?rect=0,0,1000,1000\&w=300\&q=90)

锐化强度 200：[https://demo.bitiful.com/girl.jpeg?rect=0,0,1000,1000\&w=300\&q=90 **`&sharp=200`**](https://demo.bitiful.com/girl.jpeg?rect=0,0,1000,1000\&w=300\&q=90\&sharp=200)

![锐化强度 200](https://demo.bitiful.com/girl.jpeg?rect=0,0,1000,1000\&w=300\&q=90\&sharp=200)

锐化强度 500：[https://demo.bitiful.com/girl.jpeg?rect=0,0,1000,1000\&w=300\&q=90 **`&sharp=500`**](https://demo.bitiful.com/girl.jpeg?rect=0,0,1000,1000\&w=300\&q=90\&sharp=500)

![锐化强度 500](https://demo.bitiful.com/girl.jpeg?rect=0,0,1000,1000\&w=300\&q=90\&sharp=500)

USM 锐化，强度 60、半径 2：

<https://demo.bitiful.com/girl.jpeg?rect=0,0,1000,1000&w=300&q=90&usm=60&usmrad=2>
