turakvlad/replace-color

Not compatible with latest jimp version (0.6.4)

janikga opened this issue · 6 comments

Hey guys, here we go again :)

The library is using jimp ^0.5.3 and not compatible with the latest jimp version I use in my project (0.6.4). As last time, upgrading jimp here should do the trick :)

Affected by this lack of compatibility is my desire to composite images that have been manipulated with replace-color.

const transformedImage = await replaceColor({
        image: imagePath,
        colors: {
          targetColor,
          replaceColor: desiredColor,
          type: 'hex'
        }
      })

Afterwards, when trying to someImage.composite(transformedImage, 0, 0) I get the error message that transformedImage is not a valid jimp object.

Looking forward to the fix!

Janik

For now, I simply convert the transformedImage into a Buffer, before creating a jimp instance from it again, but thats not so clean :>

Hey, @jagaSto!

I've just bumped Jimp version to 0.6.4 and library's version to 2.1.0. Please, check whether everything is good and let me know.

Thanks!

Hey man, cheers!

I just tried to install 2.1.0 from npm, but it does not seem to be fully distributed yet (the latest version I can install for now is 2.0.0). As there is no rush, I will just wait another day and see if the package is fully distributed by then :)

Hey!

It has been already distributed to NPM. You can take a look at the versions' tab here - https://www.npmjs.com/package/replace-color.

Try to install the package with npm install replace-color@2.1.0. It should work.

Hey, @jagaSto!

Is it working for you now? I would like to close this issue.

Hey, sorry, totally forgot to answer. Yes, it's working now! Cheers! @turakvlad