Bitmap.GetPixels(Int32[], Int32, Int32, Int32, Int32, Int32, Int32) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns in pixels[] a copy of the data in the bitmap.
[Android.Runtime.Register("getPixels", "([IIIIIII)V", "")]
public void GetPixels (int[]? pixels, int offset, int stride, int x, int y, int width, int height);
[<Android.Runtime.Register("getPixels", "([IIIIIII)V", "")>]
member this.GetPixels : int[] * int * int * int * int * int * int -> unit
Parameters
- pixels
- Int32[]
The array to receive the bitmap's colors
- offset
- Int32
The first index to write into pixels[]
- stride
- Int32
The number of entries in pixels[] to skip between rows (must be >= bitmap's width). Can be negative.
- x
- Int32
The x coordinate of the first pixel to read from the bitmap
- y
- Int32
The y coordinate of the first pixel to read from the bitmap
- width
- Int32
The number of pixels to read from each row
- height
- Int32
The number of rows to read
- Attributes
Exceptions
if x, y, width, height exceed the bounds of the bitmap, or if abs(stride)
if the pixels array is too small to receive the specified number of pixels.
Remarks
Java documentation for android.graphics.Bitmap.getPixels(int[], int, int, int, int, int, int)
.
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.