MCPcopy Create free account
hub / github.com/ImageOptim/libimagequant / new

Method new

src/hist.rs:90–98  ·  view source on GitHub ↗
(attr: &Attributes)

Source from the content-addressed store, hash-verified

88 #[inline]
89 #[must_use]
90 pub fn new(attr: &Attributes) -> Self {
91 Self {
92 posterize_bits: attr.posterize_bits(),
93 max_histogram_entries: attr.max_histogram_entries,
94 fixed_colors: HashSet::with_hasher(U32Hasher(0)),
95 hashmap: HashMap::with_hasher(U32Hasher(0)),
96 gamma: None,
97 }
98 }
99
100 /// "Learns" colors from the image, which will be later used to generate the palette.
101 ///

Callers

nothing calls this directly

Calls 2

U32HasherClass · 0.85
posterize_bitsMethod · 0.80

Tested by

no test coverage detected