|
|
|
@ -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) { |
|
|
|
|