图像完整适配

把整张图片缩放到指定宽高内,保持比例,不裁切、不拉伸。图片与目标尺寸的比例不同时,空余区域会填充留边。

输入: 图片文件(打开文件)结果: 图片预览与下载

或将图片拖到这里

文本输入

运行后查看结果

案例

Fit the complete image inside a 64 by 64 square. Compare this padding behaviour with Cover Image.

A checkerboard exposes flipped or softened edges

输入

A checkerboard exposes flipped or softened edges — original image

结果

Run to see the image

Expected: 64 × 64 px · dimensions checked

宽度
64
高度
64
水平对齐
Center
垂直对齐
Middle
缩放算法
Nearest Neighbour
不透明背景
On
A portrait frame shows cropping and padding

输入

A portrait frame shows cropping and padding — original image

结果

Run to see the image

Expected: 64 × 64 px · dimensions checked

宽度
64
高度
64
水平对齐
Center
垂直对齐
Middle
缩放算法
Nearest Neighbour
不透明背景
On
An RGB landscape separates the colour channels

输入

An RGB landscape separates the colour channels — original image

结果

Run to see the image

Expected: 64 × 64 px · dimensions checked

宽度
64
高度
64
水平对齐
Center
垂直对齐
Middle
缩放算法
Nearest Neighbour
不透明背景
On
A translucent badge tests alpha preservation

输入

A translucent badge tests alpha preservation — original image

结果

Run to see the image

Expected: 64 × 64 px · dimensions checked

宽度
64
高度
64
水平对齐
Center
垂直对齐
Middle
缩放算法
Nearest Neighbour
不透明背景
On
A pixel-art cross makes rotation visible

输入

A pixel-art cross makes rotation visible — original image

结果

Run to see the image

Expected: 64 × 64 px · dimensions checked

宽度
64
高度
64
水平对齐
Center
垂直对齐
Middle
缩放算法
Nearest Neighbour
不透明背景
On

相关工具

多媒体

操作参考

查看原始技术文档 (English)