Convert an interleaved RGBA byte buffer — the layout getImageData() returns — to a one-value-per-pixel luminance array using the Rec.709 weights. Alpha is ignored: the canvas is already composited.
getImageData()
Interleaved RGBA bytes, at least width * height * 4 long.
width * height * 4
Image width in pixels.
Image height in pixels.
A Float32Array of width * height luminance values in [0, 255].
Float32Array
width * height
[0, 255]
If the dimensions are not positive or the buffer is too short.
Convert an interleaved RGBA byte buffer — the layout
getImageData()returns — to a one-value-per-pixel luminance array using the Rec.709 weights. Alpha is ignored: the canvas is already composited.