How to encode 24 frames into one 24bit RGB image?

I want to add Blender support for a lightfield display device.
The way the display works with standard HDMI cable is the video has each 24bit RGB frame store 24 monochrome frames. The display splits those frames as it receives them.
Here’s an illustration:

For this to work of course the monochrome frames must be properly encoded in a single 24bit RGB image first. Can the Blender API or any Blender-friendly Python API do this?