57 fichier = fopen((
const char *)imgname,
"rb");
92 fseek (fichier,0,SEEK_SET);
98 fseek(fichier,0,SEEK_END);
101 for(i=0;i< img->
he ;i++)
103 for(j=0 ; j< img->
wi ;j++)
160 FILE* fichier = NULL;
161 fichier = fopen((
const char *)imgname,
"wb");
172 for(i=0;i< img->
he ;i++)
174 for(j=0 ; j< img->
wi ;j++)
176 fputc(img->
Blue[i][j], fichier);
177 fputc(img->
Green[i][j], fichier);
178 fputc(img->
Red[i][j], fichier);
218 imgdest->
wi = imgsrc->
wi;
219 imgdest->
he = imgsrc->
he;
223 for(i_img=0;i_img< (imgsrc->
he ) ;i_img++)
226 for(j_img=0 ; (j_img< imgsrc->
wi );j_img++)
228 imgdest->
Red[i_img][j_img] = imgsrc->
Red[i_img][j_img];
229 imgdest->
Green[i_img][j_img] = imgsrc->
Green[i_img][j_img];
230 imgdest->
Blue[i_img][j_img] = imgsrc->
Blue[i_img][j_img];
#define ERR_HEADER_TOO_BIG
#define OFFSET_IMG_HEIGHT
CPU_INT08U FileHeader_size
#define OFFSET_IMG_DEPTH_size
CPU_CHAR write_img(CPU_CHAR *imgname, t_img *img)
Write an image buffer into a BMP file.
Global include file for LLIPS.
#define OFFSET_IMG_P_DATA
CPU_CHAR copy_img(t_img *imgsrc, t_img *imgdest)
Copy source image into destination image.
#define OFFSET_IMG_DATA_WIN24bit
#define OFFSET_IMG_HEIGHT_size
CPU_INT08U ** createTableINT08U(CPU_INT16S nbLin, CPU_INT16S nbCol)
Allocate memory for a CPU_INT08U 2D table.
CPU_INT08U FileHeader[MAX_HEADER_size]
CPU_VOID init_img(t_img *img)
Initialize and allocate memory for a potentional load_img()
#define OFFSET_IMG_P_DATA_size
CPU_CHAR load_img(CPU_CHAR *imgname, t_img *img)
Load a bmp file into an organized memory area.
#define OFFSET_IMG_WIDTH_size