minor fixes

This commit is contained in:
tth
2021-02-10 16:19:15 +01:00
parent 75f36c0f6a
commit 57af8c2e93
6 changed files with 26 additions and 15 deletions

View File

@@ -17,6 +17,8 @@
extern int verbosity;
/* --------------------------------------------------------------------- */
/*
*/
int essai_plasma(char *infile, char *outfile, int ikoef, float fkoef)
{
FloatImg src, dst;
@@ -27,15 +29,24 @@ fprintf(stderr, ">>> %s ( '%s' '%s' %d %g )\n", __func__,
/* 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;
if (0 == foo) {
fprintf(stderr, "%s: image '%s' loaded\n", __func__, infile);
}
else {
/* make a fancy synthetic picture */
foo = fimg_create(&src, 800, 600, FIMG_TYPE_RGB);
}
fprintf(stderr, "'%s' loaded\n", infile);
fimg_printhead(&src);
fimg_printhead(&src);
fimg_clone(&src, &dst, 1);
foo = fimg_prototype_plasma(&dst, fkoef, 0);
if (foo) {
fprintf(stderr, "%s: err %d on plasma proto\n", __func__, foo);
return -88;
}
fimg_mul_3(&src, &dst, &dst);
foo = fimg_export_picture(&dst, outfile, 0);
if (foo) {