Exemple #1
0
        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] : (byte)0;
                y       = (j > 0) ? rowbprev[j] : (byte)0;
                rowb[i] = (byte)(rowbfilter[i] + PngHelperInternal.FilterPaethPredictor(x, rowbprev[i], y));
            }
        }
Exemple #2
0
        void FilterRowPaeth()
        {
            int i, j;
            int bytesPerRow = ImgInfo.BytesPerRow;
            int bytesPixel  = ImgInfo.BytesPixel;

            for (j = 1 - bytesPixel, i = 1; i <= bytesPerRow; i++, j++)
            {
                rowbfilter[i] = (byte)(
                    rowb[i] - PngHelperInternal.FilterPaethPredictor(
                        a:  j > 0 ? rowb[j] : (byte)0,
                        b:  rowbprev[i],
                        c:  j > 0 ? rowbprev[j] : (byte)0
                        )
                    );
            }
        }