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.
 
 
 
 

40 lines
858 B

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include "../floatimg.h"
/* --------------------------------------------------------------------- */
int main(int argc, char *argv[])
{
int foo;
int width, height;
char *fname;
FloatImg fimg;
if (4 != argc) {
fimg_print_version(1);
fprintf(stderr, "Usage:\n\t%s quux.fimg width height\n", argv[0]);
exit(1);
}
fname = argv[1];
width = atoi(argv[2]); height = atoi(argv[3]);
fprintf(stderr, "making '%s' %d x %d\n", fname, width, height);
foo = fimg_create(&fimg, width, height, 3);
if (foo) {
fprintf(stderr, "create floatimg -> %d\n", foo);
exit(1);
}
fimg_clear(&fimg);
foo = fimg_dump_to_file(&fimg, fname, 0);
if (foo) {
fprintf(stderr, "dump floatimg -> %d\n", foo);
exit(1);
}
return 0;
}
/* --------------------------------------------------------------------- */