|
maug
Quick and dirty C mini-augmentation library.
|

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_PX_FLAG_NEW_LINE 0x02 |
| Flag for mfmt_read_bmp_px_t() indicating a new line has started. | |
| #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. | |
| typedef MERROR_RETVAL(* | mfmt_read_1px_cb) (void *data, uint8_t px, int32_t x, int32_t y, void *header_info, uint8_t flags) |
| Parameter for mfmt_read_px_cb() functions to process individual pixel data. | |
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, off_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_get_px_ptr (struct MFMT_STRUCT_BMPINFO *header_bmp_info, mfile_t *p_bmp_in, size_t px_offset, MAUG_MHANDLE *p_px_h) |
| Read mfmt_bitmap header and return a handle to the bitmap's decompressed pixel data if it is compressed, or NULL if it is not. | |
| MERROR_RETVAL | mfmt_read_bmp_px_cb (struct MFMT_STRUCT *header, mfile_t *p_file_in, uint32_t px_offset, off_t file_sz, uint8_t flags, mfmt_read_1px_cb px_cb, void *px_cb_data) |
| Read mfmt_bitmap pixels and process them using a callback. | |
| 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. | |
| #define MFMT_PX_FLAG_NEW_LINE 0x02 |
Flag for mfmt_read_bmp_px_t() indicating a new line has started.
| 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.
| p_file_in | Pointer to file to read compressed data from. |
| file_offset | Number of bytes into p_file where data starts. |
| file_sz | Number of bytes of compressed data in p_file. |
| buffer_out | Unlocked handle to write uncompressed data to. |
| buffer_out_sz | Maximum number of bytes buffer_out can hold. |
| flags | Additional flags for compression options. |