Writing BMP image in pure c/c++ without other libraries
See if this works for you… In this code, I had 3 2-dimensional arrays, called red,green and blue. Each one was of size [width][height], and each element corresponded to a pixel – I hope this makes sense! FILE *f; unsigned char *img = NULL; int filesize = 54 + 3*w*h; //w is your image width, … Read more