C语言画图__并保存我画的图片
来源:百度知道 编辑:UC知道 时间:2024/06/12 11:04:13
请高手给出程序。。。。。。(关键是怎么保存,因为在屏幕上闪一下,就没了,岂不是可惜了?)
谢谢~~
分数不是问题,如果程序正确,再追加50---100。关键是程序要好.....
加些分上去,我把代码贴上来。
/* HELLO.C -- Hello, world */
#include <graphics.h>
#include <stdio.h>
void save_pic(char *fn,int maxx,int maxy){
typedef long LONG;
typedef unsigned char BYTE;
typedef unsigned long DWORD;
typedef unsigned short WORD;
typedef struct tagBITMAPFILEHEADER {
WORD bfType;
DWORD bfSize;
WORD bfReserved1;
WORD bfReserved2;
DWORD bfOffBits;
} BITMAPFILEHEADER;
typedef struct tagBITMAPINFOHEADER{
DWORD biSize;
LONG biWidth;
LONG biHeight;
WORD biPlanes;
WORD biBitCount;
DWORD biCompression;
DWORD biSizeImage;
LONG biXPelsPerMeter;
LONG biYPelsPerMeter;<