Bitmap bitmap = BitmapFactory.DecodeResource(Resources, Resource.Drawable.android_robot); Android.Graphics.Bitmap.Config config = bitmap.GetConfig();
BitmapFactory.Options options = new BitmapFactory.Options(); options.InJustDecodeBounds = true; BitmapFactory.DecodeResource(Resources, Resource.Drawable.android_robot, options); Android.Graphics.Bitmap.Config config = options.OutConfig;This code example uses BitmapFactory.Options to decode the bounds of the image resource and retrieves its configuration using OutConfig property. Package library: Android.Graphics