ascii-chat 0.11.33
Video chat in your terminal
Loading...
Searching...
No Matches
image_t Struct Reference

Image structure. 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)
 
uint8_t alloc_method
 Allocation method (image_alloc_method_t) for correct deallocation.
 

Detailed Description

Image structure.

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:

  • pixels array is allocated separately from image structure (except for pool alloc)
  • 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() or image_new_from_pool()).
Image structure and pixels array can be freed separately if needed.
Compatible with webcam capture functions (webcam_read_context()).
alloc_method tracks allocation source for correct deallocation.

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

Field Documentation

◆ alloc_method

uint8_t image_t::alloc_method

Allocation method (image_alloc_method_t) for correct deallocation.

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

Referenced by create_mixed_ascii_frame_for_client(), image_destroy(), image_new(), and image_new_from_pool().

◆ h

◆ pixels

◆ w


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