Open yuanchieh-cheng opened 6 years ago
I also need the same functionality.
is there any other way to use getBufferAsync without waiting until it gets an update?
Hi guys, I am afraid it's going to be non-trivial to fix since I haven't worked on this module almost a decade. A lot of things have been changed like Jimp which is upstream of this module.
It's unfortunate there's no way around to use new Jimp without an update on this module.
I am also looking for a new way to adopt various upstream modules by plugin system. It may take some time to introduce, I will be on it.
@Rundik I did this as a work around:
const buffer = await new Promise((resolve, reject) =>
image.getBuffer(jimp.MIME_PNG, (error, buffer) => {
if (error) reject(error)
else resolve(buffer)
})
)
It would probably be cleaner to just use util.promisify
or something similar.
@preco21 That's awesome to hear! This was the perfect library for my usecase, exactly what I needed. This project deserves to get updated!
If you want, I would happily contribute on migrating the package to the newest Jimp version.
@joglr Hey, that sounds awesome. Although it’s being revamped, it would be very appreciated since I can reuse your contribution!
@preco21 any update on this? This library is awesome btw!!!
I notice the jimp version depended by merge-img is quite old (0.2.27). Could you please update to the latest version because it would helpful if I can use
img.getBufferAsync("image/jpeg")
. Thanks a lot.