A fast, correct image dithering library in Go.
Exactly one year after the previous release of this library, here's another. This significantly reduces memory usage for error diffusion dithering, as well as making it faster.
If you'd like to support the development of this library, as well as my other projects, you can sponsor me through Ko-Fi or Github Sponsors.
Copied from CHANGELOG.md
This is release is exciting, as it fixes some long standing nagging issues with the library. Now all images should be dithered correctly and producing the mathematically best output, especially compared to existing libraries. From a correctness standpoint, I think it is likely this library is complete (for the sRGB colorspace).
Note the dithered output of color images will be different in this release for most palettes. It will be improved, but it will be different. I do not consider this a breaking change.
If you'd like to support the development of this library, as well as my other projects, you can sponsor me through Ko-Fi or Github Sponsors.
Copied from CHANGELOG.md
This release supports images with transparency. See #8 and the new README section for more.
If you'd like to support the development of this library, as well as my other projects, you can sponsor me through Ko-Fi or Github Sponsors.
Copied from CHANGELOG.md
This release simplifies usage of .Dither
, and makes some important bug fixes around palette usage. These improvements came about because of my work on a CLI tool for this library, didder, so check that out!
If you'd like to support the development of this library, as well as my other projects, you can sponsor me through Ko-Fi or Github Sponsors.
Copied from CHANGELOG.md
OrdereredDitherMatrix
Dither
never returns nil
, making code simplerDither
NewDitherer
GetColorPalette
DitherPaletted
and DitherPalettedConfig
GetColorModel
This release is mainly for some accuracy fixes, in linearization and rounding. Unfortunately it requires a breaking change, since uint16
is used for linear RGB values instead of uint8
. This is the only breaking change. Please start using v2 over v1.
If you'd like to support the development of this library, as well as my other projects, you can sponsor me through Ko-Fi or Github Sponsors.
Copied from CHANGELOG.md
ErrorDiffusionStrength
to set the strength of error diffusion dithering (#4)RoundClamp
function for making your own PixelMappers
that round correctlyuint16
instead of uint8
now, because 8-bits is not enough to accurately hold a linearized value. This is a breaking change, hence the new major version.Initial release of the library, with ordered dithering and error diffusion dithering, but no special kinds of dithering. All tests pass and everything seems to work ok. Have fun!
If you'd like to support the development of this library, as well as my other projects, you can sponsor me through Ko-Fi or Github Sponsors.