FloatImg4PythonBinding/lib/t.c

37 lines
640 B
C

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include "../floatimg.h"
int verbosity;
int main(int argc, char *argv[])
{
int foo;
FloatImg fimg;
int datas[3];
char *fname = "foo.fimg";
verbosity = 1;
fimg_print_version(0);
foo = fimg_create(&fimg, 640, 480, 3);
printf("retour fimg_create ---> %d\n", foo);
fimg_printhead(&fimg);
fimg_describe(&fimg, "vroum");
// fimg_save_as_pnm(&fimg, "foo.pnm", 0);
foo = fimg_dump_to_file(&fimg, fname, 0);
foo = fimg_fileinfos("foo.fimg", datas);
printf("%s : largeur %d hauteur %d type %d\n",
fname, datas[0], datas[1], datas[2]);
return 0;
}