Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can Jimp write a jpg file which exactly have the same color which I set? #685

Open
libook opened this issue Dec 31, 2018 · 0 comments
Open
Labels
bug there is a bug in the way jimp behaves help wanted

Comments

@libook
Copy link

libook commented Dec 31, 2018

Expected Behavior

I used setPixelColor to operate the color of each pixels.

I used this to save the jpg file:

picture.quality(100).writeAsync(path);

I wish that Jimp can write a jpg file which exactly have the same color which I set.

Current Behavior

When I used getPixelColor to read the saved jpg,
I found that the colors are a little bit different with what I operated.

But this seems only effected with saving jpg.

After I saved the picture as bmp, I read the bmp file. I got the colors I wanted.

Steps to Reproduce

  1. Use Jimp.read to read the jpg file.
  2. Use setPixelColor to edit a color of a pixel.
  3. Use quality(100).writeAsync to save the file as a new jpg.
  4. Use Jimp.read to read the new jpg file.
  5. Use getPixelColor to get the color which I edited.
  6. Compare the color with what I set before.
  7. They are different a little.

Context

  • Jimp Version: 0.6.0
  • Operating System: Windows 10 Pro 64bit
  • Node version: 111.6.0

So, may I save the color into jpg strictly as what I want?

Thank you for checking this.

Failure Logs

Nope.

@hipstersmoothie hipstersmoothie added help wanted bug there is a bug in the way jimp behaves and removed issue-in-dependency labels Feb 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug there is a bug in the way jimp behaves help wanted
Projects
None yet
Development

No branches or pull requests

2 participants