libwinbmp.h

Structures

`bmp_file_header_t`_
Bitmap file info.
`bmp_bitmap_info_header_t`_
Bitmap data info.
`bmp_t`_
Bitmap structure.

Utility Functions

`bmp_t *bmp_load(const char *path)`_
Loads bitmap file from the path into bmp_t structure.
`int bmp_write(bmp_t *bmp, const char *path)`_
Writes in-memory bitmap to a file.
`void bmp_destroy(bmp_t *bmp)`_
Deallocates memory taken up by the bitmap.
`unsigned int get_row_size(bmp_t *bmp)`_
Calculates row size including 4-byte alignment padding.
`unsigned int get_pixel_array_size(bmp_t *bmp)`_
Calculates pixel array size including 4-byte alignment padding.

Image Functions

Just a bunch of simple functions.

Image Arithmetic

`bmp_t *bmp_add(bmp_t *bmp, const bmp_t *other)`_
Adds two bitmaps.
`bmp_t *bmp_subtract(bmp_t *bmp, const bmp_t *other)`_
Subtracts two bitmaps.
`bmp_t *bmp_difference(bmp_t *bmp, const bmp_t *other)`_
Subtracts two bitmaps (absolute pixel distance is returned).
`bmp_t *bmp_multiply(bmp_t *bmp, const bmp_t *other)`_
Multiplies two bitmaps.
`bmp_t *bmp_average(bmp_t *bmp, const bmp_t *other)`_
Returns minimum of two pixels.
`bmp_t *bmp_min(bmp_t *bmp, const bmp_t *other)`_
Returns maximum of two pixels.

Convolution Filters

`bmp_t *bmp_blur(bmp_t *bmp)`_
Blurs the bitmap.
`bmp_t *bmp_edges(bmp_t *bmp)`_
Detects the edges.
`bmp_t *bmp_sharpen(bmp_t *bmp)`_
Sharpens the image.
`bmp_t *bmp_emboss(bmp_t *bmp)`_
Creates emboss effect.
`bmp_t *bmp_mean(bmp_t *bmp)`_
Mean blur filter.