You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was wondering whether we could have access to the palette statistics (how many times a color has been used). I am doing two passes right now, one to compute the palette, and another one to quantize an image (with NearestColor), before comparing the pixels with the palette (to gather statistics).
This seems quite unoptimized.
I have been trying to look at the _idxi32 property of the palette, but I couldn't get the information consistently.
Thanks!
The text was updated successfully, but these errors were encountered:
if I get question right palette has no required color statistics at all.
I recall RGBQuant uses rgba (uint32) statistics internally (probably not what you need)
Re _idxi32: private _i32idx is used in Palette as cache for rgba color => palette index conversion, cache is built during array/nearest color/riemersma image quantizing. Cache is cache, even after one ImageQuantizer pass, _i32idx has not all i32 (rgba) keys, but only queried by quantizer algorithm, it is even cannot be guaranteed _i32idx will have all i32 values from image (because of implementation details of ImageQuantizer algorithms).
It would be nice to see use case to understand what is needed.
I was wondering whether we could have access to the palette statistics (how many times a color has been used). I am doing two passes right now, one to compute the palette, and another one to quantize an image (with
NearestColor
), before comparing the pixels with the palette (to gather statistics).This seems quite unoptimized.
I have been trying to look at the
_idxi32
property of the palette, but I couldn't get the information consistently.Thanks!
The text was updated successfully, but these errors were encountered: