Android Guides | Samples

Android.Graphics.Bitmap.CopyPixelsFromBuffer Method

Syntax

[Android.Runtime.Register("copyPixelsFromBuffer", "(Ljava/nio/Buffer;)V", "")]
public Void CopyPixelsFromBuffer (Buffer src)

Parameters

src

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.

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.

[Android Documentation]

Requirements

Namespace: Android.Graphics
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 3