ascii-chat
Binary v0.15.83-53-gb711d8720
Library lib/v0.3.2-701-gb711d8720
Video chat in your terminal
Loading...
Searching...
No Matches
image_t Struct Reference

SIMD-friendly storage for one RGB pixel. r, g, and b hold the color channels and padding keeps the layout aligned for vector loads; it is normally embedded in renderer buffers, not individually allocated. More...

#include <include/ascii-chat/video/rgba/image.h>

Data Fields

int w
 Image width in pixels (must be > 0).
int h
 Image height in pixels (must be > 0).
rgb_pixel_t * pixels
 Pixel data array (width * height RGB pixels, row-major order).

Detailed Description

SIMD-friendly storage for one RGB pixel. r, g, and b hold the color channels and padding keeps the layout aligned for vector loads; it is normally embedded in renderer buffers, not individually allocated.

An owned RGB image with dimensions and row-major pixel storage

Complete image structure containing dimensions and pixel data. Pixel data is stored as a contiguous array of RGB pixels in row-major order. Compatible with webcam capture and image processing pipeline.

MEMORY LAYOUT:

  • structure and pixels share one allocation, with pixels aligned to 64 bytes
  • pixels array size: width * height * sizeof(rgb_pixel_t)
  • Pixel access: pixels[row * width + col]
  • Row-major order (first row, then second row, etc.)
Note
Pixel array must be allocated (by image_new()).
Only image_destroy() releases an owned image; pixels are a borrowed view.
Compatible with webcam capture functions (webcam_read_context()).

Definition at line 128 of file video/rgba/image.h.

Field Documentation

◆ h

◆ pixels

◆ w


The documentation for this struct was generated from the following file: