diff options
author | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2020-02-20 19:52:52 -0500 |
---|---|---|
committer | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2020-02-20 19:52:52 -0500 |
commit | eff29d94fbf41f0992ffac7bb5a04a08b71f3453 (patch) | |
tree | cd326427f12660a4389c4defac30c55960013a5d /src/SMAPI/Framework/ContentManagers/ModContentManager.cs | |
parent | 2cc786907b2a6cd62691ba2d6514f45a7b46c03c (diff) | |
download | SMAPI-eff29d94fbf41f0992ffac7bb5a04a08b71f3453.tar.gz SMAPI-eff29d94fbf41f0992ffac7bb5a04a08b71f3453.tar.bz2 SMAPI-eff29d94fbf41f0992ffac7bb5a04a08b71f3453.zip |
don't premultiply fully opaque pixels
Diffstat (limited to 'src/SMAPI/Framework/ContentManagers/ModContentManager.cs')
-rw-r--r-- | src/SMAPI/Framework/ContentManagers/ModContentManager.cs | 4 |
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()); } |