您可以使用以下代码将一张图像放置在另一张图像前面: sharp(pathToBaseImage) .composite([{ input: bufferFrontImage }]) .sharpen() .toBuffer()
import { joinImages } from 'join-images'
而不是import joinImages from 'join-images'
。 - Alex G