2.value.split(" ").map(Number);
    const imgData = $in1.getContext("2d").getImageData(0, 0, width, height);
    const in1 = imgData.data;
    const in2 = $in2.getContext("2d").getImageData(0, 0, width, height).data;
    for (let i = 0, l = in1.length; i < l; i += 4) {
      const in1R = in1[i];
      const in1G = in1[i + 1];
      const in1B = in1[i + 2];
      const in2R = in2[i];
      // outR = fgR * aplha + bgR * (1 - aplha)
      const alpha = 1 - (in1R - in2R) / (bg1R - bg2R);
      in1[i] = (in1R - 