Engines/FlatRedBallXNA/FlatRedBall/IO/PngLoader.cs
/// <summary>
/// A helper for the ReverseFilterPaeth method
/// </summary>
/// <param name="left"></param>
/// <param name="up"></param>
/// <param name="upLeft"></param>
/// <returns></returns>
A helper for the ReverseFilterPaeth method
A helper for the ReverseFilterPaeth method
private static byte PaethPredictor(int left, int up, int upLeft)
        {
            int p = (int)(left + up - upLeft);
            int pleft = System.Math.Abs((int)(p - left));
            int pup = System.Math.Abs((int)(p - up));
            int pupleft = System.Math.Abs((int)(p - upLeft));
            if ((pleft <= pup) && (pleft <= pupleft)) return (byte)left;
            else if (pup <= pupleft) return (byte)up;
            else return (byte)upLeft;
        }
private static byte PaethPredictor ( int left , int up , int upLeft ) { int p = ( int ) ( left + up - upLeft ) ; int pleft = System . Math . Abs ( ( int ) ( p - left ) ) ; int pup = System . Math . Abs ( ( int ) ( p - up ) ) ; int pupleft = System . Math . Abs ( ( int ) ( p - upLeft ) ) ; if ( ( pleft <= pup ) && ( pleft <= pupleft ) ) return ( byte ) left ; else if ( pup <= pupleft ) return ( byte ) up ; else return ( byte ) upLeft ; }
A helper for the ReverseFilterPaeth method
A helper for the ReverseFilterPaeth method
None
left
int
None
up
int
None
upLeft
int
None