public static byte Multiply(byte value1, byte value2)
 {
     return(Calculations.ClampToByte((value1 * value2) / 255));
 }
 public static byte Screen(byte value1, byte value2)
 {
     return(Calculations.ClampToByte(255 - ((255 - value1) * (255 - value2)) / 255));
 }
 public static byte Difference(byte value1, byte value2)
 {
     return(Calculations.ClampToByte(Math.Abs(value1 - value2)));
 }
 public static byte Overlay(byte value1, byte value2)
 {
     return(Calculations.ClampToByte(value2 <= 127 ?
                                     (value1 * value2) / 127.5f :
                                     255 - ((255 - value1) * (255 - value2)) / 127.5f));
 }
 public static byte LinearDodge(byte value1, byte value2)
 {
     return(Calculations.ClampToByte(value1 + value2));
 }
 public static byte Opacity(byte value1, byte value2, float opacity)
 {
     return(Calculations.ClampToByte(opacity * value1 + (1f - opacity) * value2));
 }
 public static byte LinearBurn(byte value1, byte value2)
 {
     return(Calculations.ClampToByte(value1 + value2 - 255));
 }