Function newSolidImage

  • 生成可以被 ScriptUI 控件读取的纯色图片编码明文

    Parameters

    • size: [number, number]

      图片尺寸

    • color: [number, number, number]

      图片颜色

    Returns ScriptUIImage

    0.1.0

    foo, bar, yoo

    const pathDesktop = _.pathDesktop.fsName;
    _.times(100, index => {
    const image = _.newSolidImage([100, 100], [10 * index, 20 * index, 30 * index]) as unknown as string;
    _.writeFile(_.templateString("${0}/image/icon_${1}.png", pathDesktop, String(index)), image, "binary");
    });