Bitmap.CopyPixelsFromBuffer(Buffer) Method

Definition

Copy the pixels from the buffer, beginning at the current position, overwriting the bitmap's pixels.

[Android.Runtime.Register("copyPixelsFromBuffer", "(Ljava/nio/Buffer;)V", "")]
public void CopyPixelsFromBuffer (Java.Nio.Buffer src);
[<Android.Runtime.Register("copyPixelsFromBuffer", "(Ljava/nio/Buffer;)V", "")>]
member this.CopyPixelsFromBuffer : Java.Nio.Buffer -> unit

Parameters

src
Buffer
Attributes

Remarks

Copy the pixels from the buffer, beginning at the current position, overwriting the bitmap's pixels. The data in the buffer is not changed in any way (unlike setPixels(), which converts from unpremultipled 32bit to whatever the bitmap's native format is. The pixels in the source buffer are assumed to be in the bitmap's color space.

After this method returns, the current position of the buffer is updated: the position is incremented by the number of elements read from the buffer. If you need to read the bitmap from the buffer again you must first rewind the buffer.

Java documentation for android.graphics.Bitmap.copyPixelsFromBuffer(java.nio.Buffer).

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