aheckmann / gm

GraphicsMagick for node
http://aheckmann.github.com/gm/
6.96k stars 617 forks source link

two resizes into one append #853

Open braco opened 1 year ago

braco commented 1 year ago

Am I mistaken in thinking this should create a collage of img1 and img2? From what I can tell this should work, but it produces a single image, not an appended collage, without throwing any errors.

  const img1 = gm(sources[0]).resize(240, 240);
  const img2 = gm(sources[1]).resize(240, 240);

  return new Promise((resolve, reject) => {
    img1.append(img2, true)
      .write(outPath, (err) => {
        if (err) reject(err);
        resolve(outPath);
      });
  });