mirror of https://github.com/SixLabors/ImageSharp
Browse Source
thanks @tocsoft for investigation and finding the bug. He proposed to just replace < by <= in line 78, but that would only shift the problem to values > 1. Those values should not be used from a semantic point, but it's not forbidden in a float value. My fix here keeps the <, but adds an else path that uses the original value from scanline[i]. This adds an else to the code (which technically adds a jump after the then-part), but omits the multiplication. The simple solution @tocsoft proposed might be faster, but should be preferred if and only if BlendPercentage can be guaranteed to be <=1.af/merge-core
1 changed files with 4 additions and 0 deletions
Loading…
Reference in new issue