PixelLayout

type PixelLayout = "interleaved" | "planar"

Represents how the individual channels per pixel are arranged in memory.

  • 'interleaved' stores complete pixels next to each other, which corresponds to (N)HWC:
    RGBRGBRGBRGB
    RGBRGBRGBRGB
    RGBRGBRGBRGB
  • 'planar' stores one full channel plane after the other, which corresponds to (N)CHW:
    RRRRRRRRRRRR
    GGGGGGGGGGGG
    BBBBBBBBBBBB