maug
Quick and dirty C mini-augmentation library.
Loading...
Searching...
No Matches
Maug File Format API
Collaboration diagram for Maug File Format API:

Topics

 Maug File Format: Bitmap
 Constants and functions describing the Windows bitmap format.
 

Files

file  mfmt.h
 

Data Structures

struct  MFMT_STRUCT
 Generic image description struct. More...
 

Macros

#define MFMT_DECOMP_FLAG_4BIT   0x01
 
#define MFMT_DECOMP_FLAG_8BIT   0x02
 
#define MFMT_PX_FLAG_INVERT_Y   0x01
 
#define MFMT_TRACE_BMP_LVL   0
 
#define MFMT_TRACE_RLE_LVL   0
 

Typedefs

typedef MERROR_RETVAL(* mfmt_decode) (mfile_t *p_file_in, off_t file_offset, off_t file_sz, size_t line_w, MAUG_MHANDLE buffer_out, off_t buffer_out_sz, uint8_t flags)
 Callback to decode compressed data.
 
typedef MERROR_RETVAL(* mfmt_read_header_cb) (struct MFMT_STRUCT *header, mfile_t *p_file_in, uint32_t file_offset, off_t file_sz, uint8_t *p_flags)
 Callback to read image header and get properties.
 
typedef MERROR_RETVAL(* mfmt_read_palette_cb) (struct MFMT_STRUCT *header, uint32_t *palette, size_t palette_sz, mfile_t *p_file_in, uint32_t file_offset, off_t file_sz, uint8_t flags)
 Callback to read image palette into 24-bit RGB values.
 
typedef MERROR_RETVAL(* mfmt_read_px_cb) (struct MFMT_STRUCT *header, uint8_t SEG_FAR *px, off_t px_sz, mfile_t *p_file_in, uint32_t file_offset, off_t file_sz, uint8_t flags)
 Callback to read image pixels into 8-bit values.
 

Functions

MERROR_RETVAL mfmt_decode_rle (mfile_t *p_file_in, off_t file_offset, off_t file_sz, size_t line_w, MAUG_MHANDLE buffer_out, off_t buffer_out_sz, uint8_t flags)
 Decode RLE-encoded data from an input file into a memory buffer.
 
MERROR_RETVAL mfmt_read_bmp_header (struct MFMT_STRUCT *header, mfile_t *p_file_in, uint32_t file_offset, off_t file_sz, uint8_t *p_flags)
 
MERROR_RETVAL mfmt_read_bmp_palette (struct MFMT_STRUCT *header, uint32_t *palette, size_t palette_sz, mfile_t *p_file_in, uint32_t file_offset, off_t file_sz, uint8_t flags)
 
MERROR_RETVAL mfmt_read_bmp_px (struct MFMT_STRUCT *header, uint8_t SEG_FAR *px, off_t px_sz, mfile_t *p_file_in, uint32_t file_offset, off_t file_sz, uint8_t flags)
 Read mfmt_bitmap pixels into an 8-bit memory bitmap.
 

Detailed Description

Typedef Documentation

◆ mfmt_decode

typedef MERROR_RETVAL(* mfmt_decode) (mfile_t *p_file_in, off_t file_offset, off_t file_sz, size_t line_w, MAUG_MHANDLE buffer_out, off_t buffer_out_sz, uint8_t flags)

Callback to decode compressed data.

Parameters
p_file_inPointer to file to read compressed data from.
file_offsetNumber of bytes into p_file where data starts.
file_szNumber of bytes of compressed data in p_file.
buffer_outUnlocked handle to write uncompressed data to.
buffer_out_szMaximum number of bytes buffer_out can hold.
flagsAdditional flags for compression options.