Fosfat  1.0.0
Functions
fosgra.h File Reference
#include <inttypes.h>
#include <fosfat.h>

Go to the source code of this file.

Functions

uint32_t fosgra_color_get (fosfat_t *fosfat, const char *path, uint8_t idx)
 Get the color RGB24 from a .COLOR index. More...
 
uint8_t * fosgra_get_buffer (fosfat_t *fosfat, const char *path, int offset, int size)
 Get decoded .IMAGE|.COLOR buffer. More...
 
void fosgra_get_info (fosfat_t *fosfat, const char *path, uint16_t *x, uint16_t *y, uint8_t *bpp)
 Get informations on the .IMAGE|.COLOR. More...
 
int fosgra_is_image (fosfat_t *fosfat, const char *path)
 Test if the file is a .IMAGE|.COLOR. More...
 

Detailed Description

libfosgra public API header.

Definition in file fosgra.h.

Function Documentation

◆ fosgra_color_get()

uint32_t fosgra_color_get ( fosfat_t fosfat,
const char *  path,
uint8_t  idx 
)

Get the color RGB24 from a .COLOR index.

Parameters
[in]fosfatdisk handle.
[in]pathlocation on the FOS disk.
[in]idxcolor index in map.
Returns
the color in RGB24.

◆ fosgra_get_buffer()

uint8_t* fosgra_get_buffer ( fosfat_t fosfat,
const char *  path,
int  offset,
int  size 
)

Get decoded .IMAGE|.COLOR buffer.

Parameters
[in]fosfatdisk handle.
[in]pathlocation on the FOS disk.
[in]offsetfrom where (in bytes) in the data.
[in]sizehow many bytes.
Returns
NULL if error or return the buffer.

◆ fosgra_get_info()

void fosgra_get_info ( fosfat_t fosfat,
const char *  path,
uint16_t *  x,
uint16_t *  y,
uint8_t *  bpp 
)

Get informations on the .IMAGE|.COLOR.

Parameters
[in]fosfatdisk handle.
[in]pathlocation on the FOS disk.
[out]ximage width.
[out]yimage height.
[out]bppbits per pixel.

◆ fosgra_is_image()

int fosgra_is_image ( fosfat_t fosfat,
const char *  path 
)

Test if the file is a .IMAGE|.COLOR.

Parameters
[in]fosfatdisk handle.
[in]pathlocation on the FOS disk.