lovell/sharp
在 GitHub 查看Enhancement: add support to extend feature for width and height
Open
#1,072 创建于 2017年12月19日
enhancementhelp wanted
仓库指标
- Star
- (31,994 star)
- PR 合并指标
- (平均合并 4天 19小时) (30 天内合并 18 个 PR)
描述
Hello,
is there a way to pad an image if it's smaller than required dimensions?
For example:
| desired dimensions | actual dimensions | expected result |
|---|---|---|
| 1000x1000 | 200x200 | 1000x1000 image with 200x200 centered inside |
| 300x300 | 350x350 | downscaled to 300x300 |
Original

Desired output
