Byakuren 1.0.1
A theme color extracting library implemented by C.
|
#include "../bkr_common.h"
Go to the source code of this file.
Functions | |
int | bkr_mix_calculate_color_stats (bkr_rgb *pixels, uint32_t pixel_count, uint32_t octree_max_colors, bkr_mindiff_parameter *mindiff_param, bkr_color_stats stats[]) |
Byakuren - A theme color extracting library implemented by C. | |
|
extern |
Byakuren - A theme color extracting library implemented by C.
Copyright (c) 2024 XadillaX i@233.nosp@m.3.mo.nosp@m.e
MIT License https://github.com/XadillaX/byakuren/blob/master/LICENSE
Calculate color statistics using a mixed approach of octree quantization and minimum difference method.
This function combines the efficiency of octree color quantization with the accuracy of the minimum difference method to produce high-quality color statistics. The process involves several steps:
This mixed approach allows for faster processing of large images while still maintaining color accuracy and adhering to a specific color palette.
pixels | Pointer to an array of bkr_rgb structures representing the pixels to process. |
pixel_count | The number of pixels in the pixels array. |
octree_max_colors | The maximum number of colors to use in the octree quantization step. |
mindiff_param | Pointer to a bkr_mindiff_parameter structure containing parameters for the minimum difference calculation. |
stats | Pointer to an array of bkr_color_stats structures where the results will be stored. |