changm / gamma-lut-rs

A port of Skia's gamma correcting Look Up Table
Mozilla Public License 2.0
3 stars 3 forks source link

add quantized_floor and quantized_ceil to Color #8

Closed lsalzman closed 7 years ago

lsalzman commented 7 years ago

This will allow a slightly cleaner solution preserving light/dark mask determination while quantizing for macOS. While the normal quantize tries to make an average, these utility functions allow us to pick the smallest or lowest, which is useful for respecting the mask determination threshold in that specific case.