BMPのファイルフォーマットにしたがってファイルを書き出せばよいのではないでしょうか。 ファイル構造 → http://www.kk.iij4u.or.jp/~kondo/bmp/ #include <windows.h> #include <stdio.h> #include <malloc.h> /* filname: 出力ファイル名 width: 画像横幅 height: 画像縦幅 bpp: 画像色深度(bits per pixel) この例ではbpp=24専用 */ bool bmp_out(char* filename, int width, int height, int bpp) { unsigned char *buffer; int scanline = ((width * bpp + 31) & ~31) / 8; // 4byte境界 int image_size =
