XenevaOS
Loading...
Searching...
No Matches
Functions
glimpse_image.cpp File Reference
#include "glimpse_image.h"
#include "upng.h"
#include <nanojpg.h>
#include <bmp.h>
#include <sys/_kefile.h>
#include <stdlib.h>
#include <string.h>
Include dependency graph for glimpse_image.cpp:

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)
 

Function Documentation

◆ GlimpseFitDimensions()

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.

◆ GlimpseFreeImage()

void GlimpseFreeImage ( GlimpseRawImage *  img)

Free memory allocated for raw image pixels.

◆ GlimpseLoadImage()

bool GlimpseLoadImage ( const char *  path,
GlimpseRawImage *  out_img 
)

Load any supported image format (.jpg, .jpeg, .png, .bmp) into 32-bit RGBA.

◆ GlimpseResizeImage()

bool GlimpseResizeImage ( const GlimpseRawImage *  src,
int  dst_w,
int  dst_h,
GlimpseRawImage *  out_resized 
)

High-performance integer area-sampling downscale / resize.

◆ GlimpseSaveBmp()

bool GlimpseSaveBmp ( const char *  path,
const GlimpseRawImage *  img 
)

Save a 32-bit RGBA image to disk as a standard Chitralekha-compatible BMP file.