Bitmap.AllocationByteCount Property

Definition

Returns the size of the allocated memory used to store this bitmap's pixels.

public int AllocationByteCount { [Android.Runtime.Register("getAllocationByteCount", "()I", "")] get; }
[<get: Android.Runtime.Register("getAllocationByteCount", "()I", "")>]
member this.AllocationByteCount : int

Property Value

Attributes

Remarks

Returns the size of the allocated memory used to store this bitmap's pixels.

This can be larger than the result of #getByteCount() if a bitmap is reused to decode other bitmaps of smaller size, or by manual reconfiguration. See #reconfigure(int, int, Config), #setWidth(int), #setHeight(int), #setConfig(Bitmap.Config), and BitmapFactory.Options#inBitmap BitmapFactory.Options.inBitmap. If a bitmap is not modified in this way, this value will be the same as that returned by #getByteCount().

This value will not change over the lifetime of a Bitmap.

Java documentation for android.graphics.Bitmap.getAllocationByteCount().

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

See also

  • <xref:Android.Graphics.Bitmap.Reconfigure(System.Int32%2c+System.Int32%2c+System.Int32)>