用c语言读取并显示bmp图像1

用c语言读取并显示bmp图像1


2024年5月20日发(作者:)

如何在WIN-TC中或TC++3.0中把一张BMP格式的图片显示出来?

下面的是<>随书光盘上的代码,我在TC2.0下编译通过.

它是利用了抖动技术显示了8bit和24bit的位图(也就是256色和16M色位图),应该

能满足你的需要.

不过,我想问下,你老师教过抖动显示吗?

#include

#include

#include

#include

#define NoError 0

#define ErrorFileOpen 1

#define ErrorFileType 2

#define ErrorImageColor 3

typedef struct tagBITMAPFILEHEADER

1

{

unsigned int bfType;

unsigned long bfSize;

unsigned int bfReserved1;

unsigned int bfReserved2;

unsigned long bfoffBits;

}BITMAPFILEHEADER;

typedef struct tagBITMAPINFOHEADER

{

unsigned long biSize;

unsigned long biWidth;

unsigned long biHeight;

unsigned int biPlanes;

2


发布者:admin,转转请注明出处:http://www.yc00.com/news/1716183839a2726531.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信