bmpio.h

来自「傅立叶变换和小波变换是图像压缩的重要工具。该代大戏是利用小波变换进行图像压缩。」· C头文件 代码 · 共 44 行

H
44
字号
#ifndef BMPIO_H
#define BMPIO_H

#ifdef __cplusplus
extern "C" {
#endif

#include <crblib/inc.h>

#define MBTYPE_8BIT_PAL		0
#define MBTYPE_8BIT_GRAY	1
#define MBTYPE_24BIT_RGB	2

typedef struct 
{
	int width,height,type,dataBytes,ncolors;
	ubyte * palette;
	ubyte * data;
} myBMP;

extern void freeBMP(myBMP * mb);

// loadImage will try to detect the image type

extern myBMP * loadImage(char *name);

extern bool saveBMP(myBMP *mybm,char *name);
extern myBMP * loadBMP(char *name);

extern bool saveRAW(myBMP *mybm,char *name);
extern myBMP * loadRAW(char *name);

//	save & load will do this for you, but you may want to do it
//		yourself (for example, to CreateDIBitmap)

extern void swapBGRtoRGB(ubyte *ptr,int len);

#ifdef __cplusplus
}
#endif

#endif // BMPIO_H

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?