boilerplate for plasmas

This commit is contained in:
tth
2021-02-03 19:33:38 +01:00
parent 1b24c65877
commit 75f36c0f6a
6 changed files with 67 additions and 19 deletions

View File

@@ -16,6 +16,35 @@
extern int verbosity;
/* --------------------------------------------------------------------- */
int essai_plasma(char *infile, char *outfile, int ikoef, float fkoef)
{
FloatImg src, dst;
int foo;
fprintf(stderr, ">>> %s ( '%s' '%s' %d %g )\n", __func__,
infile, outfile, ikoef, fkoef);
/* if infile is loadable, use it for background */
foo = fimg_create_from_dump(infile, &src);
if (foo) {
fprintf(stderr, "%s: error loading '%s'\n", __func__, infile);
return foo;
}
fprintf(stderr, "'%s' loaded\n", infile);
fimg_printhead(&src);
fimg_clone(&src, &dst, 1);
foo = fimg_export_picture(&dst, outfile, 0);
if (foo) {
fprintf(stderr, "%s : err %d saving result\n", __func__, foo);
return foo;
}
return -1;
}
/* --------------------------------------------------------------------- */
/* nouveau 24 octobre 2020, pendant le masque-flamme coronavidique */