[英]How to determine what colour depth application is using?
如果在WMAppManifest.xml文件中設置BitsPerPixel =“ 32”,則應用程序將具有32位色深。 問題是低成本設備始終使用16位,因此圖像變得斷斷續續。 我想確定在應用程序中使用BitsPerPixel的值。 怎么做?
您可以像這樣從GraphicsDevice
獲取當前的SurfaceFormat
:
// XNA
game.GraphicsDevice.DisplayMode.Format;
// Silverlight
page.SharedGraphicsDeviceManager.Current.GraphicsDevice.DisplayMode.Format;
這將返回SurfaceFormat.Bgr565
為16位顏色深度和SurfaceFormat.Color
為32位顏色深度。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.