iTextSharp.text.pdf.codec.PngImage.GetPixel C# (CSharp) Méthode

GetPixel() static private méthode

static private GetPixel ( byte image, int x, int y, int bitDepth, int bytesPerRow ) : int
image byte
x int
y int
bitDepth int
bytesPerRow int
Résultat int
        static int GetPixel(byte[] image, int x, int y, int bitDepth, int bytesPerRow)
        {
            if (bitDepth == 8) {
                int pos = bytesPerRow * y + x;
                return image[pos] & 0xff;
            }
            else {
                int pos = bytesPerRow * y + x / (8 / bitDepth);
                int v = image[pos] >> (8 - bitDepth * (x % (8 / bitDepth))- bitDepth);
                return v & ((1 << bitDepth) - 1);
            }
        }

Same methods

PngImage::GetPixel ( byte curr ) : int[]