⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ibgimage.h

📁 有限元学习研究用源代码(老外的),供科研人员参考
💻 H
字号:
/* last edit: Ilja Schmelzer -------------- 13-OCT-1994 17:16:14.57	*/
/************************************************************************/
/*                                                                      */
/*  <<< I B G >>> - Intersection - Based Grid generation package 	*/
/*                                                                      */
/*  Version 1.1             author:  schmelzer@iaas-berlin.d400.de      */
/*                                                                      */
/*  to be distributed under IBG license conditions (see "readme.ibg")	*/
/*                                                                      */
/************************************************************************/
/*	reading and using rgb image files				*/

#define ibgImageMax		0xff
#define ibgImageR(p,ix,iy)	((p)->r[(ix)+(p)->lx*(iy)])
#define ibgImageG(p,ix,iy)	((p)->g[(ix)+(p)->lx*(iy)])
#define ibgImageB(p,ix,iy)	((p)->b[(ix)+(p)->lx*(iy)])
#define ibgImageLx(p)		((p)->lx)
#define ibgImageLy(p)		((p)->ly)
#define ibgColorOn(p)		((p)->color)

#define ibgImageFormatPBW   	1
#define ibgImageFormatPGray	2
#define ibgImageFormatPColor	3
#define ibgImageFormatPBWRaw  	4
#define ibgImageFormatPGrayRaw	5
#define ibgImageFormatPColorRaw	6

typedef struct ibgImage0 *ibgImage;

/*
	Tries to read the image file.
	Currently implemented: Only Jef Poskanzer's PPM image format.
*/

ibgImage ibgImageLoad(char *filename);
ibgImage ibgImageAlloc(unsigned lx, unsigned ly, unsigned colorOn);
int	 ibgImageSave(ibgImage picture, char *filename, int format);
int	 ibgImageFree(ibgImage picture);

/* private part: (Can be replaced in new versions): */
struct ibgImage0{
  	char	*r;
  	char	*g;
  	char	*b;
	int	lx;		/* pixels in x-direction	*/
	int	ly;		/* pixels in y-direction	*/
	int	color;
};

⌨️ 快捷键说明

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