PeachDrawing.Core
PeachDrawing.Core.PixelMath
PixelMath.Unpremultiply(ReadOnlySpan<byte>, Span<byte>) Method
Converts premultiplied RGBA8 to straight alpha into destination (same length).
public static void Unpremultiply(System.ReadOnlySpan<byte> premultiplied, System.Span<byte> destination);
Parameters
premultiplied System.ReadOnlySpan<System.Byte>
the premultiplied pixels, four bytes each in R, G, B, A order
destination System.Span<System.Byte>
receives the straight-alpha pixels; the same length as premultiplied