Browse Source
Merge branch 'master' into feature/tga
af/merge-core
Brian Popow
7 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
2 deletions
-
src/ImageSharp/PixelFormats/PixelBlenders/PorterDuffFunctions.cs
|
|
|
@ -164,7 +164,7 @@ namespace SixLabors.ImageSharp.PixelFormats.PixelBlenders |
|
|
|
float srcW = source.W - blendW; |
|
|
|
|
|
|
|
// calculate final alpha
|
|
|
|
float alpha = dstW + srcW + blendW; |
|
|
|
float alpha = dstW + source.W; |
|
|
|
|
|
|
|
// calculate final color
|
|
|
|
Vector4 color = (destination * dstW) + (source * srcW) + (blend * blendW); |
|
|
|
@ -191,7 +191,7 @@ namespace SixLabors.ImageSharp.PixelFormats.PixelBlenders |
|
|
|
float dstW = destination.W - blendW; |
|
|
|
|
|
|
|
// calculate final alpha
|
|
|
|
float alpha = dstW + blendW; |
|
|
|
float alpha = destination.W; |
|
|
|
|
|
|
|
// calculate final color
|
|
|
|
Vector4 color = (destination * dstW) + (blend * blendW); |
|
|
|
|