.color method is slow
- Dominant language
- TypeScript
- Stars
- 14.7k
- Forks
- 777
- PR merge metrics
- No merged PRs in 30d
Description
# Expected Behavior
I would expect some simple colour manipulation to not take longer than 2 seconds.
# Current Behavior
Currently it takes about 8 seconds.
## Steps to Reproduce
```typescript
console.time("process time");
// Tested with any 1600x900 image
const imageBuffer = await image
.color([
{ apply: "desaturate", params: [90] },
{ apply: "darken", params: [40] },
])
.contrast(0.3)
.getBase64Async(Jimp.AUTO);
console.timeEnd("process time"); // process time: 7.738s
```
```
No options: process time: 228.178ms
Only contrast: process time: 232.918ms
Only desaturate: process time: 4.191s
Only darken: process time: 4.153s
```
## Context
- Jimp Version: 0.22.5
- Operating System: Windows 11 Home, 22H2, 22621.1265, Windows Feature Experience Pack 1000.22638.1000.0
- Node version: 18.12.1
Contributor guide
Assessment
This issue has not been assessed yet.