private int GetOffset(int X, int Y) { return Y * BytesPerLine + PixelFormatDecoder.GetPixelsSize(GuPixelFormat, X); }