ascii-chat
Binary v0.16.114-28-gf5913657f
Library lib/v0.3.2-3302-gf5913657f
Video chat in your terminal
Loading...
Searching...
No Matches
util/image.h
Go to the documentation of this file.
1
10
11#pragma once
12
13#include "../asciichat_errno.h"
14#include <stddef.h>
15#include <stdint.h>
16
17#ifdef __cplusplus
18extern "C" {
19#endif
20
32 size_t *out_pixel_count);
33
45 size_t bytes_per_pixel,
46 size_t *out_size);
47
59 size_t *out_size);
60
74 size_t struct_size,
75 size_t bytes_per_pixel,
76 size_t *out_size);
77
90
100
101#ifdef __cplusplus
102}
103#endif
Synchronized per-thread pending error stacks and value snapshots. SET_ERRNO pushes,...
unsigned int height
Definition fft.c:24
unsigned int width
Definition fft.c:24
asciichat_error_t
Error and exit codes - unified status values (0-255).
Definition error_codes.h:48
asciichat_error_t image_validate_buffer_size(size_t requested_size)
Validate buffer size against maximum allocation limit.
Definition util/image.c:134
asciichat_error_t image_validate_dimensions(size_t width, size_t height)
Validate image dimensions (non-zero, within limits).
Definition util/image.c:116
asciichat_error_t image_calc_pixel_buffer_size(size_t pixel_count, size_t bytes_per_pixel, size_t *out_size)
Calculate pixel buffer size with overflow checking.
Definition util/image.c:37
asciichat_error_t image_calc_pixel_count(size_t width, size_t height, size_t *out_pixel_count)
Calculate pixel count with overflow checking.
Definition util/image.c:13
asciichat_error_t image_calc_rgb_size(size_t width, size_t height, size_t *out_size)
Calculate total RGB buffer size from dimensions.
Definition util/image.c:64
asciichat_error_t image_calc_total_allocation(size_t width, size_t height, size_t struct_size, size_t bytes_per_pixel, size_t *out_size)
Calculate combined size of image struct + pixel buffer.
Definition util/image.c:81