2019-06-29 23:50:03 +02:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <unistd.h>
|
2019-08-07 11:55:29 +02:00
|
|
|
#include <string.h>
|
2019-06-29 23:50:03 +02:00
|
|
|
|
|
|
|
#include "../floatimg.h"
|
|
|
|
|
|
|
|
int verbosity;
|
|
|
|
|
|
|
|
|
|
|
|
int main(int argc, char *argv[])
|
|
|
|
{
|
|
|
|
int foo;
|
|
|
|
FloatImg fimg;
|
2019-07-08 06:28:04 +02:00
|
|
|
int datas[3];
|
2019-08-07 17:30:16 +02:00
|
|
|
char *fname = "foo.fimg";
|
2019-06-29 23:50:03 +02:00
|
|
|
verbosity = 1;
|
|
|
|
|
2019-08-07 11:55:29 +02:00
|
|
|
fimg_print_version(0);
|
|
|
|
|
2019-07-08 06:28:04 +02:00
|
|
|
foo = fimg_create(&fimg, 640, 480, 3);
|
2019-08-07 11:55:29 +02:00
|
|
|
printf("retour fimg_create ---> %d\n", foo);
|
2019-06-29 23:50:03 +02:00
|
|
|
|
|
|
|
fimg_printhead(&fimg);
|
2019-08-07 12:15:28 +02:00
|
|
|
fimg_describe(&fimg, "vroum");
|
2019-06-29 23:50:03 +02:00
|
|
|
|
2019-07-08 06:28:04 +02:00
|
|
|
// fimg_save_as_pnm(&fimg, "foo.pnm", 0);
|
2019-08-07 17:30:16 +02:00
|
|
|
foo = fimg_dump_to_file(&fimg, fname, 0);
|
2019-07-08 06:28:04 +02:00
|
|
|
|
|
|
|
foo = fimg_fileinfos("foo.fimg", datas);
|
2019-06-29 23:50:03 +02:00
|
|
|
|
2019-08-07 17:30:16 +02:00
|
|
|
printf("%s : largeur %d hauteur %d type %d\n",
|
|
|
|
fname, datas[0], datas[1], datas[2]);
|
|
|
|
|
2019-06-29 23:50:03 +02:00
|
|
|
return 0;
|
2019-07-08 06:28:04 +02:00
|
|
|
}
|