public BMP(uint width, int height, uint bitPerPixel = 24) { fileHeader = new BITMAPFILEHEADER(pixelArraySize(width, height, bitPerPixel)); infoHeader = new BITMAPINFOHEADER((int)width, height, bitPerPixel); pixels = new BGR[width * Math.Abs(height)]; }