|
ascii-chat 0.6.0
Real-time terminal-based video chat with ASCII art conversion
|
🖨️ Image processing: format detection, decoding, scaling, and pixel format conversion More...
Go to the source code of this file.
Functions | |
| image_t * | image_new (size_t width, size_t height) |
| Create a new image with standard allocation. | |
| void | image_destroy (image_t *p) |
| Destroy an image allocated with image_new() | |
| image_t * | image_new_from_pool (size_t width, size_t height) |
| Create a new image from buffer pool. | |
| void | image_destroy_to_pool (image_t *image) |
| Destroy an image allocated from buffer pool. | |
| void | image_clear (image_t *p) |
| Clear image (set all pixels to black) | |
| rgb_pixel_t * | image_pixel (image_t *p, const int x, const int y) |
| void | image_resize (const image_t *s, image_t *d) |
| Resize image using nearest-neighbor interpolation. | |
| void | image_resize_interpolation (const image_t *source, image_t *dest) |
| Resize image using bilinear interpolation. | |
| void | precalc_rgb_palettes (const float red, const float green, const float blue) |
| Precalculate RGB palettes with color adjustment. | |
| char * | image_print (const image_t *p, const char *palette) |
| Print image as ASCII art (monochrome) | |
| void | quantize_color (int *r, int *g, int *b, int levels) |
| Quantize color to specified number of levels. | |
| char * | image_print_color (const image_t *p, const char *palette) |
| Print image as ASCII art with color. | |
| char * | rgb_to_ansi_fg (int r, int g, int b) |
| Convert RGB to ANSI foreground color code. | |
| char * | rgb_to_ansi_bg (int r, int g, int b) |
| Convert RGB to ANSI background color code. | |
| void | rgb_to_ansi_8bit (int r, int g, int b, int *fg_code, int *bg_code) |
| Convert RGB to 8-bit ANSI color codes. | |
| char * | image_print_with_capabilities (const image_t *image, const terminal_capabilities_t *caps, const char *palette, const char luminance_palette[256] __attribute__((unused))) |
| char * | image_print_256color (const image_t *image, const char *palette) |
| Print image using 256-color ANSI mode. | |
| char * | image_print_16color (const image_t *image, const char *palette) |
| Print image using 16-color ANSI mode. | |
| char * | image_print_16color_dithered (const image_t *image, const char *palette) |
| Print image using 16-color ANSI mode with dithering. | |
| char * | image_print_16color_dithered_with_background (const image_t *image, bool use_background, const char *palette) |
| Print image using 16-color ANSI mode with dithering and background colors. | |
🖨️ Image processing: format detection, decoding, scaling, and pixel format conversion
Definition in file video/image.c.
|
inline |
Definition at line 224 of file video/image.c.
References image_t::h, image_t::pixels, and image_t::w.
| char * image_print_with_capabilities | ( | const image_t * | image, |
| const terminal_capabilities_t * | caps, | ||
| const char * | palette, | ||
| const char luminance_palette | __attribute__((unused))[256] | ||
| ) |
Definition at line 655 of file video/image.c.
References terminal_capabilities_t::color_level, ERROR_INVALID_PARAM, ERROR_INVALID_STATE, image_t::h, image_print(), image_print_16color_dithered_with_background(), image_print_256color(), image_print_color(), image_print_color_simd(), image_print_simd(), image_t::pixels, terminal_capabilities_t::render_mode, RENDER_MODE_BACKGROUND, RENDER_MODE_HALF_BLOCK, SET_ERRNO, TERM_COLOR_16, TERM_COLOR_256, TERM_COLOR_NONE, TERM_COLOR_TRUECOLOR, and image_t::w.
Referenced by ascii_convert_with_capabilities().