interleave_planes Function

Defined in pyglet.extlibs.png

interleave_planes(ipixels, apixels, ipsize, apsize)

Interleave (colour) planes, e.g. RGB + A = RGBA.

Return an array of pixels consisting of the ipsize elements of data from each pixel in ipixels followed by the apsize elements of data from each pixel in apixels. Conventionally ipixels and apixels are byte arrays so the sizes are bytes, but it actually works with any arrays of the same type. The returned array is the same type as the input arrays which should be the same type as each other.

Previous topic

group Function

Next topic

isarray Function