13 Commits

Author SHA1 Message Date
Copilot
ec6e322148
feat(png): add automatic gamma detection from PNG metadata for color-accurate quantization (#152)
* Initial plan

* Initial analysis of PNG quantization color distortion issue

Co-authored-by: Brooooooklyn <3468483+Brooooooklyn@users.noreply.github.com>

* fix(png): correct gamma handling in PNG quantization to prevent color distortion

Co-authored-by: Brooooooklyn <3468483+Brooooooklyn@users.noreply.github.com>

* feat(png): add configurable gamma parameter for non-sRGB images in quantization

- Add optional gamma parameter to PngQuantOptions
- Default to 0.45 (sRGB) but allow override for linear RGB (1.0) and other color spaces
- Added comprehensive documentation with common gamma values
- Addresses concern about non-sRGB source images

Co-authored-by: Brooooooklyn <3468483+Brooooooklyn@users.noreply.github.com>

* feat(png): add automatic gamma detection from PNG metadata in quantization

Co-authored-by: Brooooooklyn <3468483+Brooooooklyn@users.noreply.github.com>

* feat(png): remove manual gamma override, use only automatic detection

Removed the gamma field from PngQuantOptions struct per feedback from @Brooooooklyn.
Now only uses detect_gamma_from_png_info() for automatic gamma detection from
PNG metadata (sRGB chunk, gAMA chunk, or sRGB fallback).

Co-authored-by: Brooooooklyn <3468483+Brooooooklyn@users.noreply.github.com>

* remove package-lock.json and add to gitignore

Co-authored-by: Brooooooklyn <3468483+Brooooooklyn@users.noreply.github.com>

* revert accidental yarn.lock format change and generated files

Co-authored-by: Brooooooklyn <3468483+Brooooooklyn@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Brooooooklyn <3468483+Brooooooklyn@users.noreply.github.com>
2025-09-04 10:00:26 +08:00
LongYinan
89631c32fc
feat: upgrade all deps (#132) 2025-06-27 19:24:12 +08:00
LongYinan
352e7adc55
feat: add wasm build (#81) 2024-02-14 09:29:36 +08:00
LongYinan
eceba75142
feat: upgrade dependencies (#73) 2024-02-07 17:02:35 +08:00
LongYinan
3fd7d8434f
perf(image): make overlay lazy (#35) 2023-01-14 11:20:56 +00:00
LongYinan
f52fd45245
feat(image): provide fast resize method (#34)
* feat: provide a way to fast resize image with SIMD

* Update

* Update x86_64-unknown-linux-gnu build

* Optimize

* Add fast resize to Transformer

* Resolve conflict
2023-01-14 18:39:54 +08:00
LongYinan
e1e84d286b docs: API references and benchmark results 2022-04-19 16:23:07 +08:00
LongYinan
7cd00d4181
feat: async Transformer class (#9) 2022-04-18 13:49:54 +08:00
LongYinan
81fc73a7ec
feat: support avif
- Add avif encode feature
- Add documentation for `@napi-rs/image` package
- Add tests for `webp` and `avif` encode function
2022-03-29 18:18:21 +08:00
LongYinan
5b916b3c3c
feat(image): implement svg_min 2022-01-24 00:01:28 +08:00
LongYinan
66f5e0f2ef
feat(image): implement png_quantize 2022-01-23 19:20:53 +08:00
LongYinan
d0de72e2a8
feat: transform into monorepo (#3) 2022-01-20 18:40:23 +08:00
LongYinan
c0997adba5
Init 2022-01-11 00:11:26 +08:00