SMAPI - Stardew Modding API

SMAPI - Stardew Modding API

971k Downloads

Overlay transparency bug on Linux/Mac

Pathoschild opened this issue · 1 comments

commented

On Linux/Mac, applying an image overlay through the content API sometimes causes a border of transparent pixels along some edges of the overlay. Identical code on Windows works fine.

For example, the image below has three areas:

  • darker area is part of the overlay;
  • lighter area is the original showing through transparent pixels in the overlay;
  • black border is fully-transparent pixels showing the void beneath the tiles.

commented

Fixed in develop for the upcoming SMAPI 2.5.4.

Fully-transparent pixels have alpha 0 on Windows (which makes sense), but alpha 0–2 on Linux/Mac for some reason. Since it's unlikely an actual alpha of 2 would be noticeable in-game, I added a slight tolerance to the full-transparency detection: