void Control_LoadImageSize(int width, int height) { gfx.SetSize(width / gfx.Resolution, (height / gfx.Resolution) / gfx.TextureCount); // Controlla la larghezza if (((gfx.Size.width & 3) != 0) || gfx.Size.width * gfx.Resolution != width) { nWidth.BackColor = Color.Red; } else { nWidth.BackColor = Color.DarkGreen; } // Controlla l'altezza if (((gfx.Size.height & 3) != 0) || gfx.Size.height * gfx.Resolution * gfx.TextureCount != height) { nHeight.BackColor = Color.Red; } else { nHeight.BackColor = Color.DarkGreen; } nWidth.Value = gfx.Size.width; nHeight.Value = gfx.Size.height; }