Skip to content

Function: premultiplyPixels() ​

ts
function premultiplyPixels(pixels, out?): Uint8Array;

Experimental

Premultiplied RGBA8 copy of pixels (the texture layout). Missing trailing bytes are transparent. out is reused when it has the right length.

Parameters ​

ParameterType
pixelsRasterPixels
out?Uint8Array<ArrayBufferLike>

Returns ​

Uint8Array

Released under the MIT License.