buildColorHistogram
This content is not available in your language yet.
function buildColorHistogram(source, sampleSize?): ColorCount[];Defined in: packages/core/src/bg-render/palette/histogram.ts:61
构建颜色直方图。全透明像素会被跳过,半透明像素按原色计入。
Parameters
Section titled “Parameters”| Parameter | Type | Default value | Description |
|---|---|---|---|
source |
HistogramSource |
undefined |
图像资源 |
sampleSize |
number |
DEFAULT_SAMPLE_SIZE |
统计前缩放到的最长边像素数,默认 64 |