PlatformSizePreset
Defined in: packages/capability/src/presets/platform-types.ts:51
平台尺寸预设。
字段语义:
width/height:目标像素尺寸。resize 按此尺寸缩放,crop 按此尺寸居中裁剪recommendedFormat:多数平台 JPEG/WebP 兼容性最好;含透明背景用 PNGrecommendedFit:resize 时建议的 fit 策略(cover裁掉溢出 /contain留黑边)source:数据来源标注(见 PlatformPresetSource)
Properties
Section titled “Properties”id:
string
Defined in: packages/capability/src/presets/platform-types.ts:53
全局唯一 ID,如 youtube.thumbnail
platform
Section titled “platform”platform:
string
Defined in: packages/capability/src/presets/platform-types.ts:55
平台名,如 YouTube
name:
string
Defined in: packages/capability/src/presets/platform-types.ts:57
该尺寸的具体用途名,如 Thumbnail (1280×720)
width:
number
Defined in: packages/capability/src/presets/platform-types.ts:59
目标宽度(像素)
height
Section titled “height”height:
number
Defined in: packages/capability/src/presets/platform-types.ts:61
目标高度(像素)
category
Section titled “category”category:
PlatformPresetCategory
Defined in: packages/capability/src/presets/platform-types.ts:63
用途分类
description?
Section titled “description?”
optionaldescription?:string
Defined in: packages/capability/src/presets/platform-types.ts:65
用途描述(可选)
recommendedFormat?
Section titled “recommendedFormat?”
optionalrecommendedFormat?:PlatformRecommendedFormat
Defined in: packages/capability/src/presets/platform-types.ts:67
推荐输出格式(可选)
recommendedFit?
Section titled “recommendedFit?”
optionalrecommendedFit?:PlatformFitStrategy
Defined in: packages/capability/src/presets/platform-types.ts:69
推荐 fit 策略(可选,默认 cover)
source?
Section titled “source?”
optionalsource?:PlatformPresetSource
Defined in: packages/capability/src/presets/platform-types.ts:71
数据来源(可选,缺省视为 manual)