preco21 / merge-img

Merge multiple images into a single image
MIT License
94 stars 29 forks source link

update jimp dependency version #6

Open yuanchieh-cheng opened 6 years ago

yuanchieh-cheng commented 6 years ago

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.

curbol commented 5 years ago

I also need the same functionality.

174n commented 5 years ago

is there any other way to use getBufferAsync without waiting until it gets an update?

preco21 commented 5 years ago

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.

joglr commented 5 years ago

@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.

preco21 commented 5 years ago

@joglr Hey, that sounds awesome. Although it’s being revamped, it would be very appreciated since I can reuse your contribution!

alias-rahil commented 4 years ago

@preco21 any update on this? This library is awesome btw!!!