[Commits] [wesnoth/wesnoth] 79477c: Restored scale_surface_legacy for [message] image ...

GitHub noreply at github.com
Fri Jun 23 14:46:00 UTC 2017


  Branch: refs/heads/master
  Home:   https://github.com/wesnoth/wesnoth
  Commit: 79477c635c300f014e85e5f069a386f2ba12d01c
      https://github.com/wesnoth/wesnoth/commit/79477c635c300f014e85e5f069a386f2ba12d01c
  Author: ln-zookeeper <lari.nieminen at iki.fi>
  Date:   2017-06-23 (Fri, 23 Jun 2017)

  Changed paths:
    M src/gui/core/canvas.cpp
    M src/image_modifications.cpp
    M src/sdl/utils.cpp
    M src/sdl/utils.hpp

  Log Message:
  -----------
  Restored scale_surface_legacy for [message] image scaling and ~SCALE

Fixes issue #1570 (artifacts with alpha gradients), also possibly relevant for parts of the discussion of issue #1254.

The version of scale_surface_legacy that I used is the one without alpha thresholding. It still isn't perfect, as it doesn't quite properly weigh each input pixel according to its alpha. It's possible that scale_surface could simply be fixed to not result in artifacts with alpha gradients, making a separate scaling function like this unnecessary to have, but I wasn't able to find a way to do it.

For pixel art without the kind of alpha gradients it cannot handle, scale_surface does produce a better result, but the difference seems very subtle.

Relevant past commits:
4af0e815
5f967950
2df60619





More information about the Commits mailing list