diff --git a/filters/posterize.go b/filters/posterize.go index 9845b7a..80276c7 100644 --- a/filters/posterize.go +++ b/filters/posterize.go @@ -17,13 +17,13 @@ const ( type PosterizeFilter struct { Depth uint16 - Bins map[uint16]uint16 + Bins [math.MaxUint16]uint16 DitherType int } func Posterize(depth uint16, dither_type int) gift.Filter { var i uint16 - bins := make(map[uint16]uint16) + var bins [math.MaxUint16]uint16 chunk := uint16((math.MaxUint16 + 1) / int(depth)) // BUG: this was fine with uint8, now it's dumb as hell