[][src]Module openexr::frame_buffer

A FrameBuffer points to and describes image data in memory to be used for input and output.

FrameBuffers do not contain any image buffers themselves, they only point to them elsewhere in memory. FrameBuffers are passed to other parts of the API that need to read from or write to image data in memory.

FrameBuffer is used for read-only pixel data, and FrameBufferMut is used for read/write pixel data.

FrameBufferMut dereferences to &FrameBuffer so it can be passed anywhere a &FrameBuffer can.

Examples

Building a frame buffer that points at an array of RGB values:

// Pixel data: RGB values for a 256x256 image.
let pixel_data = vec![(0.5, 1.0, 0.5); 256 * 256];

// Create a framebuffer that points at the pixel data and describes the
// tuple elements as being RGB channels.
let mut fb = FrameBuffer::new(256, 256);
fb.insert_channels(&["R", "G", "B"], &pixel_data);

Structs

FrameBuffer

Points to and describes in-memory image data for reading.

FrameBufferMut

Points to and describes in-memory image data for both reading and writing.

Traits

PixelData

Types that can be inserted into a FrameBuffer as a channel.

PixelStruct

Types that can be inserted into a FrameBuffer as a set of channels.

Type Definitions

PixelStructChannelIter

An iterator over the types and offsets of the channels in a PixelStruct.