�行的像素数据
    const imageData = context.getImageData(0, 0, tempCanvas.width, 1);
    const data = imageData.data;

    // 计算颜色出现频率
    const colorCount = {};
    for (let i = 0; i < data.length; i += 4) {
      const color = `rgb(${data[i]},${data[i+1]},${data[i+2]})`;
      colorCount[color] = (colorCount[color] || 0) + 1;
    }

    // 找到出现频率最高的颜色
    let maxColor = '';
    let maxCount = 0;
    for (const color in colorCount) {
      if (colorCount[color] >