tc39 / proposal-typedarray-stride

Proposal to add a `stride` parameter to TypedArrays
https://tc39.es/proposal-typedarray-stride/
MIT License
24 stars 3 forks source link

Usecase: Packed RGB24 data with padded row width #7

Open kdashg opened 4 years ago

kdashg commented 4 years ago

In the simple case, we have tightly packed RGB24 data, with three bytes per pixel. However, Graphics APIs strongly prefer striding width, so that rows of pixels are aligned and padded to multiples of 4, or even 16, bytes. Since there are multiple strides, a single stride is not always enough.

kdashg commented 4 years ago

@codehag