style: correct code style
This commit is contained in:
@@ -123,11 +123,17 @@ internal class ImageSharpProcessor : ImageProcessor
|
|||||||
private static byte AdjustAlpha(byte maskValue, byte minVal, byte maxVal)
|
private static byte AdjustAlpha(byte maskValue, byte minVal, byte maxVal)
|
||||||
{
|
{
|
||||||
if (maskValue <= minVal)
|
if (maskValue <= minVal)
|
||||||
|
{
|
||||||
return 0;
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (maskValue >= maxVal)
|
if (maskValue >= maxVal)
|
||||||
|
{
|
||||||
return 255;
|
return 255;
|
||||||
|
}
|
||||||
|
|
||||||
|
var proportion = (maskValue - minVal) / (float)(maxVal - minVal);
|
||||||
|
|
||||||
float proportion = (maskValue - minVal) / (float)(maxVal - minVal);
|
|
||||||
return (byte)(proportion * 255f);
|
return (byte)(proportion * 255f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user