|
libbmp
The libbmp is a too easy to use library,
there is only three functions, a function to load a bitmap, another one to write a
bitmap, and a last one to free a loaded bitmap, you just have to declare a t_bmp object and passing its address to the
read, write or free an image
The read function will load the bitmap
into memory and permit you to manipulate the data very easily, in your t_bmp
object, you'll have a variable width and a variable height, these will indicate
you the size of your image, there is also a field named data, this is a 2D array
of t_rgb structures, t_rgb contain the RGB pixel component and its color average
Do not forget that C encode its data
differently than mathematics does, this isn't data[x][y] but data[y][x] to access the
pixel at the coordinate (x, y)
|
|