/*******************************************************
* Name: creat_bmp.c
* Function: Creat a bmp picture as 320*240
* Input parameters:
* Output parameters:
* Author: ValerianFan
* Version : 1.0
* Date : 2012-1-16
*******************************************************/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
typedef unsigned char byte;
typedef unsigned short dbyte;
typedef unsigned long int dword;
typedef unsigned short word;
/*******************************************
*定义bmp文件的头部数据结构
********************************************/
#pragma pack(push,2) //保持2字节对齐
struct tagBITMAPFILEHEADER {
//bmp file header
dbyte bfType
* Name: creat_bmp.c
* Function: Creat a bmp picture as 320*240
* Input parameters:
* Output parameters:
* Author: ValerianFan
* Version : 1.0
* Date : 2012-1-16
*******************************************************/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
typedef unsigned char byte;
typedef unsigned short dbyte;
typedef unsigned long int dword;
typedef unsigned short word;
/*******************************************
*定义bmp文件的头部数据结构
********************************************/
#pragma pack(push,2) //保持2字节对齐
struct tagBITMAPFILEHEADER {
//bmp file header
dbyte bfType