Commit Graph

13 Commits

Author SHA1 Message Date
David Thomas 484f8d69bf
Check continueTask per-line, not per-pixel 2025-06-24 11:08:01 +01:00
David Thomas 87fc82a978
Flip dither matrix when zig-zagging 2025-06-24 11:08:01 +01:00
David Thomas 9e9abfab27
Add five new types of diffusion dither and expose zig zag to user
This extends the existing dithering code to add Jarvis-Judice-Ninke,
Stucki, Atkinson, Burkes and Sierra error diffused dithers. It also
exposes the zig zag (serpentine) choice to the user. Diffusion is
tweaked to use fixed point for the error values.
2025-06-24 11:08:01 +01:00
David Capello 09538f9a1a clang-format all files 2024-12-16 14:52:19 -03:00
David Capello 71d885d2a0 Replace base::clamp -> std::clamp as now we use C++17 2022-06-09 19:05:48 -03:00
David Capello 86259a64fc Replace MID() macro with base::clamp() function
In the future we will replace base::clamp() with std::clamp().
2020-04-07 19:47:16 -03:00
David Capello 109e6fa205 Add render::Dithering() class to store all dithering parameters 2019-04-03 19:32:24 -03:00
David Capello fcf272bb69 Add amount parameter to Error Diffusion algorithm 2019-04-03 18:45:18 -03:00
David Capello 08ec3767ba Add support to scan the image in zig-zag way for error diffusion filters 2019-04-03 12:14:17 -03:00
David Capello 20b8ee0e57 Add Floyd-Steinberg dithering for RGBA -> Indexed conversion 2019-04-01 22:00:32 -03:00
David Capello 44a920b444 Include base/base.h (and debug.h) for SGN/MID (and ASSERT) 2018-04-16 11:17:51 -03:00
David Capello 7a75751dd7 Move dithering algorithm to ordered_dither.cpp 2017-06-01 17:14:15 -03:00
David Capello 5ef6aac925 Add --dithering-matrix CLI option
Now the dithering matrix used in ordered dithering algorithm is configurable.
2017-05-19 15:49:31 -03:00