FilterPaethPredictor() public static méthode

public static FilterPaethPredictor ( int a, int b, int c ) : int
a int
b int
c int
Résultat int
Exemple #1
0
 private void FilterRowPaeth() {
       int i, j, imax;
       imax = ImgInfo.BytesPerRow;
       for (j = 1 - ImgInfo.BytesPixel, i = 1; i <= imax; i++, j++)
         rowbfilter[i] = (byte)(rowb[i] - PngHelperInternal.FilterPaethPredictor(j > 0 ? rowb[j] : 0,
                                                                                 rowbprev[i], j > 0 ? rowbprev[j] : 0));
 }
Exemple #2
0
        private void UnfilterRowPaeth(int nbytes)
        {
            int i, j, x, y;

            for (j = 1 - ImgInfo.BytesPixel, i = 1; i <= nbytes; i++, j++)
            {
                x       = (j > 0) ? rowb[j] : 0;
                y       = (j > 0) ? rowbprev[j] : 0;
                rowb[i] = (byte)(rowbfilter[i] + PngHelperInternal.FilterPaethPredictor(x, rowbprev[i], y));
            }
        }
Exemple #3
0
        public void FilterRowPaeth()
        {
            int bytesPerRow = ImgInfo.BytesPerRow;
            int num         = 1 - ImgInfo.BytesPixel;
            int num2        = 1;

            while (num2 <= bytesPerRow)
            {
                rowbfilter[num2] = (byte)(rowb[num2] - PngHelperInternal.FilterPaethPredictor((num > 0) ? rowb[num] : 0, rowbprev[num2], (num > 0) ? rowbprev[num] : 0));
                num2++;
                num++;
            }
        }
Exemple #4
0
        public void UnfilterRowPaeth(int nbytes)
        {
            int num  = 1 - ImgInfo.BytesPixel;
            int num2 = 1;

            while (num2 <= nbytes)
            {
                int a = (num > 0) ? rowb[num] : 0;
                int c = (num > 0) ? rowbprev[num] : 0;
                rowb[num2] = (byte)(rowbfilter[num2] + PngHelperInternal.FilterPaethPredictor(a, rowbprev[num2], c));
                num2++;
                num++;
            }
        }