diff --git a/src/ImageSharp/PixelFormats/PixelBlenders/PorterDuffFunctions.cs b/src/ImageSharp/PixelFormats/PixelBlenders/PorterDuffFunctions.cs index cd85939e03..bc7958f857 100644 --- a/src/ImageSharp/PixelFormats/PixelBlenders/PorterDuffFunctions.cs +++ b/src/ImageSharp/PixelFormats/PixelBlenders/PorterDuffFunctions.cs @@ -278,9 +278,7 @@ internal static partial class PorterDuffFunctions // unpremultiply color /= Vector4.Max(alpha, new(Constants.Epsilon)); - color.W = alpha.W; - - return color; + return WithW(color, alpha); } /// @@ -339,9 +337,7 @@ internal static partial class PorterDuffFunctions // unpremultiply color /= Vector4.Max(alpha, new(Constants.Epsilon)); - color.W = alpha.W; - - return color; + return WithW(color, alpha); } /// @@ -385,9 +381,7 @@ internal static partial class PorterDuffFunctions Vector4 color = source * alpha; // premultiply color /= Vector4.Max(alpha, new(Constants.Epsilon)); // unpremultiply - color.W = alpha.W; - - return color; + return WithW(color, alpha); } /// @@ -425,9 +419,7 @@ internal static partial class PorterDuffFunctions Vector4 color = source * alpha; // premultiply color /= Vector4.Max(alpha, new(Constants.Epsilon)); // unpremultiply - color.W = alpha.W; - - return color; + return WithW(color, alpha); } /// @@ -470,9 +462,7 @@ internal static partial class PorterDuffFunctions // unpremultiply color /= Vector4.Max(alpha, new(Constants.Epsilon)); - color.W = alpha.W; - - return color; + return WithW(color, alpha); } ///