Releases: Ivordir/Okolors
v0.8.0
v0.7.0
- The CLI help stated that the sampling factor could be above
1.0
, but this was previously not the case. - The
--verbose
flag now prints to stderr instead of stdout. - Updated dependencies. Notably, jpegs may load slightly faster due to
image
version0.25.0
.
Full Changelog: v0.6.0...v0.7.0
v0.6.0
This update is mainly for the library. See the new Changelog where future changes for the library will be posted.
For the binary/CLI application, nothing has really changed, but it has been rebuilt with newer versions of its dependencies.
Full Changelog: v0.5.1...v0.6.0
v0.5.1
This major update brings huge performance improvements, drastically overhauls the library, and more!
Highlights
Performance
Palette generation now uses better algorithms which should result in a roughly 25% to 50% decrease in palette generation time while also giving slightly more accurate palettes. These algorithms were implemented as part of the new quantette
crate.
Additionally, multiple k-means trials are no longer necessary, since the new algorithm more easily recovers from local minima. As such, the corresponding CLI flag and library parameter were removed. So, the performance increase will be even greater if you were running multiple trials for your palettes before.
Ergonomics
The library crate now uses a builder struct API. Reasonable defaults are provided for the various settings, and you now only need to modify the few settings that you want to change.
Also, the library now supports sRGB output instead of only Oklab palettes. Before, one would have to convert from Oklab to sRGB using palette
or another crate, but this functionality is now included for convenience.
License
In addition to the MIT license, the library and binary are now both available under the Apache 2.0 license.
All Changes
Below is the full list of changes directly affecting any users. Also, the full changelog: v0.4.0...v0.5.1
Library/Crate
- Completely overhauled the API. Instead of the
run
function, use the newOkolors
builder struct to create palettes. - The
Okolors
builder struct has functions to create Oklab or sRGB palettes. - Removed the trials, convergence threshold, and max iterations parameters. Now, there are only one or two parameters to control the accuracy. These are
Okolors::sampling_factor
andOkolors::batch_size
(if thethreads
feature is enabled). - The
threads
feature now exposes additional parallel functions instead of changing the implementation of existing functions. - Integration with the
image
crate is now optional and can be turned off with theimage
feature. - The alpha threshold parameter was removed. Only
RgbImage
s are supported for now.
Binary/CLI application
- Like the library, the trials, convergence threshold, and max iterations flags were removed. Now, use the
--sampling-factor
/-f
flag to control the accuracy. - Support for the bmp, avif, and tiff image formats was dropped. webp support is now enabled by default.
- The
--verbose
flag now also prints the time taken for each step. - The alpha threshold flag was removed. For now, all images with transparency are converted to RGB.
v0.4.0
New Features
- Mainly just performance improvements. Okolors should be roughly 25% faster on average.
Breaking Changes
KmeansResult
now reports the MSE instead of variance. I.e., thevariance: f32
field was replaced with anmse: f64
field.
Full Changelog: v0.3.0...v0.4.0
v0.3.0
New Features
- Added
--threads
/-t
flag to specify the number of threads - Okolors should now be 2x as fast for most images bigger than like 500 x 500 pixels
Breaking Changes
- Functions that create an
OklabCounts
now properly return aResult
to handle the error case when the number of pixels is aboveu32::MAX
. As a result, these functions have been renamed with a prefix oftry_
.
Full Changelog: v0.2.1...v0.3.0
v0.2.1
- Made
KmeansResult::empty()
public - Updated dependencies
- Edited README and added more examples
Full Changelog: v0.2.0...v0.2.1
v0.2.0
New features
- Added functions to handle images/colors with transparency (e.g.,
OklabCounts::from_rgbaimage
andOklabCounts::from_srgba
).
Breaking changes
- This is now a single top level function,
okolors::run
. This was done by replacing allokolors::from_xxx
with a correspondingokolors::OklabCounts::from_xxx
. - Renamed
OklabCounts::iter
topairs
a529e75
Full Changelog: v0.1.1...v0.2.0