|
ascii-chat 0.8.38
Real-time terminal-based video chat with ASCII art conversion
|
📐 Terminal cell aspect ratio calculations for accurate image dimension scaling More...
Go to the source code of this file.
Macros | |
| #define | CHAR_ASPECT 2.0f |
Enumerations | |
| enum | { MIN_DIMENSION = 1 } |
Functions | |
| void | aspect_ratio (const ssize_t img_w, const ssize_t img_h, const ssize_t width, const ssize_t height, const bool stretch, ssize_t *out_width, ssize_t *out_height) |
| void | aspect_ratio2 (const ssize_t img_w, const ssize_t img_h, const ssize_t target_w, const ssize_t target_h, ssize_t *out_width, ssize_t *out_height) |
| void | calculate_fit_dimensions_pixel (int img_width, int img_height, int max_width, int max_height, int *out_width, int *out_height) |
📐 Terminal cell aspect ratio calculations for accurate image dimension scaling
Definition in file aspect_ratio.c.
| #define CHAR_ASPECT 2.0f |
Definition at line 10 of file aspect_ratio.c.
| anonymous enum |
| void aspect_ratio | ( | const ssize_t | img_w, |
| const ssize_t | img_h, | ||
| const ssize_t | width, | ||
| const ssize_t | height, | ||
| const bool | stretch, | ||
| ssize_t * | out_width, | ||
| ssize_t * | out_height | ||
| ) |
Definition at line 69 of file aspect_ratio.c.
References MIN_DIMENSION.
Referenced by ascii_convert(), ascii_convert_with_capabilities(), and mirror_convert_frame().
| void aspect_ratio2 | ( | const ssize_t | img_w, |
| const ssize_t | img_h, | ||
| const ssize_t | target_w, | ||
| const ssize_t | target_h, | ||
| ssize_t * | out_width, | ||
| ssize_t * | out_height | ||
| ) |
Definition at line 95 of file aspect_ratio.c.
References MIN_DIMENSION.
| void calculate_fit_dimensions_pixel | ( | int | img_width, |
| int | img_height, | ||
| int | max_width, | ||
| int | max_height, | ||
| int * | out_width, | ||
| int * | out_height | ||
| ) |
Definition at line 146 of file aspect_ratio.c.