WSL/SLF GitLab Repository

Skip to content
  • Mathias Bavay's avatar
    A few hard coded parameters have been declared as static const (color depth... · 244c1931
    Mathias Bavay authored
    A few hard coded parameters have been declared as static const (color depth per channel, max color per channel) in order to make the code cleaner. A new method has been introduced in the Gradient class: setNrOfColors. This allows to specify a reduced number of unique colors (even if still coded on 8 bits per channel). By using this call in PNGIO (with 8000 unique colors), the output remains visibly almost the same (only some very slow varying parts see a flat color instead of a slow gradient) while the run time is reduced by up to 5% and the file size more than halved.
    244c1931