AmaroK86.ImageFormat.DDSImage.readLinearImage C# (CSharp) 메소드

readLinearImage() 개인적인 메소드

private readLinearImage ( byte imgData, int w, int h ) : Bitmap
imgData byte
w int
h int
리턴 System.Drawing.Bitmap
        private Bitmap readLinearImage(byte[] imgData, int w, int h)
        {
            Bitmap res = new Bitmap(w, h);
            int ptr = 0;
            for (int y = 0; y < h; y++)
                for (int x = 0; x < w; x++)
                    res.SetPixel(x, y, Color.FromArgb(Buffer.GetByte(imgData, ptr++)));

            return res;
        }