summaryrefslogtreecommitdiff
path: root/src/SMAPI/Framework
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2020-02-20 19:52:52 -0500
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2020-02-20 19:52:52 -0500
commiteff29d94fbf41f0992ffac7bb5a04a08b71f3453 (patch)
treecd326427f12660a4389c4defac30c55960013a5d /src/SMAPI/Framework
parent2cc786907b2a6cd62691ba2d6514f45a7b46c03c (diff)
downloadSMAPI-eff29d94fbf41f0992ffac7bb5a04a08b71f3453.tar.gz
SMAPI-eff29d94fbf41f0992ffac7bb5a04a08b71f3453.tar.bz2
SMAPI-eff29d94fbf41f0992ffac7bb5a04a08b71f3453.zip
don't premultiply fully opaque pixels
Diffstat (limited to 'src/SMAPI/Framework')
-rw-r--r--src/SMAPI/Framework/ContentManagers/ModContentManager.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/SMAPI/Framework/ContentManagers/ModContentManager.cs b/src/SMAPI/Framework/ContentManagers/ModContentManager.cs
index 6b463424..7d274eb7 100644
--- a/src/SMAPI/Framework/ContentManagers/ModContentManager.cs
+++ b/src/SMAPI/Framework/ContentManagers/ModContentManager.cs
@@ -253,8 +253,8 @@ namespace StardewModdingAPI.Framework.ContentManagers
texture.GetData(data);
for (int i = 0; i < data.Length; i++)
{
- if (data[i].A == 0)
- continue; // no need to change fully transparent pixels
+ if (data[i].A == byte.MinValue || data[i].A == byte.MaxValue)
+ continue; // no need to change fully transparent/opaque pixels
data[i] = Color.FromNonPremultiplied(data[i].ToVector4());
}