美图WEB开放平台

cropPresets 详细参数设置

设定一组或多组的裁剪尺寸或者比例,仅对M1(完整版)、M2(轻量编辑)、M4(头像编辑)有效。

【设定比例】两数值之间用":"隔开,如"3:5";(demo)

xiuxiu.setLaunchVars("cropPresets", "3:5");

【设定尺寸】两数值之间用"x"隔开,如"100x100";

xiuxiu.setLaunchVars("cropPresets", "100x100");

【设定多组尺寸/比例】(仅对完整版有效)把尺寸或者比例放在一个数组中,如["320x240","640x480","3:5","16:9"]

xiuxiu.setLaunchVars("cropPresets", ["320x240","640x480","3:5","16:9"]);

【自定义标签】(仅对完整版有效)(demo)

xiuxiu.setLaunchVars("cropPresets", ["320x240",{"my iphone":"640x920"},{"my pc":"1960*1020"}]);