|
XenevaOS
|
#include "glimpse_image.h"#include "upng.h"#include <nanojpg.h>#include <bmp.h>#include <sys/_kefile.h>#include <stdlib.h>#include <string.h>
Functions | |
| void | GlimpseFitDimensions (int src_w, int src_h, int max_w, int max_h, int *out_w, int *out_h) |
| void | GlimpseFreeImage (GlimpseRawImage *img) |
| bool | GlimpseLoadImage (const char *path, GlimpseRawImage *out_img) |
| bool | GlimpseResizeImage (const GlimpseRawImage *src, int dst_w, int dst_h, GlimpseRawImage *out_resized) |
| bool | GlimpseSaveBmp (const char *path, const GlimpseRawImage *img) |
| void GlimpseFitDimensions | ( | int | src_w, |
| int | src_h, | ||
| int | max_w, | ||
| int | max_h, | ||
| int * | out_w, | ||
| int * | out_h | ||
| ) |
Compute fitted width and height preserving aspect ratio.
| void GlimpseFreeImage | ( | GlimpseRawImage * | img | ) |
Free memory allocated for raw image pixels.
| bool GlimpseLoadImage | ( | const char * | path, |
| GlimpseRawImage * | out_img | ||
| ) |
Load any supported image format (.jpg, .jpeg, .png, .bmp) into 32-bit RGBA.
| bool GlimpseResizeImage | ( | const GlimpseRawImage * | src, |
| int | dst_w, | ||
| int | dst_h, | ||
| GlimpseRawImage * | out_resized | ||
| ) |
High-performance integer area-sampling downscale / resize.
| bool GlimpseSaveBmp | ( | const char * | path, |
| const GlimpseRawImage * | img | ||
| ) |
Save a 32-bit RGBA image to disk as a standard Chitralekha-compatible BMP file.