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

Image saturate / desaturate appear on the doc, but not on the module... #987

Closed
mlbonniec opened this issue Feb 14, 2021 · 5 comments · Fixed by #1205
Closed

Image saturate / desaturate appear on the doc, but not on the module... #987

mlbonniec opened this issue Feb 14, 2021 · 5 comments · Fixed by #1205
Labels
bug there is a bug in the way jimp behaves help wanted released This issue/pull request has been released. solution in issue

Comments

@mlbonniec
Copy link

Expected Behavior

Hi, I would like to reduce or increase my image saturation, as specified in the doc here, but the module doesn't have those options.
My issue refer to another one, previously closed: #968

Current Behavior

Type '"saturate"' is not assignable to type 'ColorActionName'. because saturate or desaturate (and lighten, darken) doesn't exist on ColorActionName.

Failure Information (for bugs)

---

Steps to Reproduce

Try to change the saturation of an image

image.color([{ apply: 'saturate', params: [10] }]);

As you can see on the screen, even Intellisense doesn't propose me saturate, desaturate...
Screenshots
Intellisense

Context

  • Jimp Version: 0.16.1
  • Operating System: macOS Big Sur 11.2
  • Node version: v14.15.1

Failure Logs

$ npm start
>>> src/helpers/FilterManager.ts(95,17): error TS2322: Type '"saturate"' is not assignable to type 'ColorActionName'.
@mlbonniec mlbonniec changed the title Image color modification appear on the doc, but not on the module... Image saturate / desaturate appear on the doc, but not on the module... Feb 14, 2021
@anuragjain
Copy link

Any update on this? Having same issue.
I checked the code and colorActionName is not defined for lot of things like saturate, desaturate,grayscale etc.

https://github.com/oliver-moran/jimp/blob/53ff9d1266207f7f674233f465ec358274510511/packages/plugin-color/index.d.ts#L3

@hipstersmoothie
Copy link
Collaborator

hipstersmoothie commented Feb 6, 2023

Could you make a PR to update the types?

@hipstersmoothie hipstersmoothie added help wanted bug there is a bug in the way jimp behaves solution in issue labels Feb 6, 2023
@daniellwdb
Copy link
Contributor

Could we make this an enum and export it so it makes refactoring easier?

@hipstersmoothie
Copy link
Collaborator

Do whatever you can to fix the issue 😇

@github-actions
Copy link
Contributor

🚀 Issue was released in v0.22.6 🚀

@github-actions github-actions bot added the released This issue/pull request has been released. label Feb 24, 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 released This issue/pull request has been released. solution in issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants