Bibliothèque de traitements d'images en virgule flottante. http://la.buvette.org/photos/cumul/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
FloatImg/tools/png2fimg.c

41 lines
786 B

/*
* PNG ---> FIMG
*/
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include "../floatimg.h"
int verbosity = 0;
/* --------------------------------------------------------------------- */
int main(int argc, char *argv[])
{
FloatImg fimg;
int foo;
if (3 != argc) {
fimg_print_version(1);
fprintf(stderr, "usage:\n\t%s foo.png bar.fimg\n", argv[0]);
exit(1);
}
memset(&fimg, 0, sizeof(FloatImg));
foo = fimg_create_from_png(argv[1], &fimg);
if (foo) {
fprintf(stderr, "%s : err %d, abort.\n", argv[0], foo);
exit(1);
}
fimg_describe(&fimg, argv[2]);
foo = fimg_dump_to_file(&fimg, argv[2], 0);
fprintf(stderr, "save as fimg -> %d\n", foo);
return 0;
}
/* --------------------------------------------------------------------- */