Language

Image.Plane.PixelStride Property

Definition

The distance between adjacent pixel samples, in bytes.

public abstract int PixelStride { [Android.Runtime.Register("getPixelStride", "()I", "GetGetPixelStrideHandler")] get; }
[<get: Android.Runtime.Register("getPixelStride", "()I", "GetGetPixelStrideHandler")>]
member this.PixelStride : int

Property Value

The byte spacing between neighboring pixel samples in a row; padding or interleaving can make it larger than one sample's byte size.

Attributes

Remarks

The distance between adjacent pixel samples, in bytes.

This is the distance between two consecutive pixel values in a row of pixels. It may be larger than the size of a single pixel to account for interleaved image data or padded formats. Pixel stride is undefined for formats such as RawPrivate. ImageReader throws UnsupportedOperationException when configured for that format. JPEG and HEIC images from ImageReader have a pixel stride of zero.

Android reference for android.media.Image.Plane.getPixelStride.

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