added a mirror function

This commit is contained in:
tth
2021-04-26 11:43:42 +02:00
parent b3de3b96f7
commit 9ddbef4e91
6 changed files with 87 additions and 5 deletions

View File

@@ -16,6 +16,39 @@
extern int verbosity;
/* --------------------------------------------------------------------- */
int essai_miroir(char *inf, char *outf, int flags)
{
int foo;
FloatImg src, dst;
fprintf(stderr, ">>> %s ( '%s' '%s' 0x%X )\n", __func__,
inf, outf, flags);
foo = fimg_create_from_dump(inf, &src);
if (0 != foo) {
fprintf(stderr, "%s: err %d loading image '%s'\n", __func__,
foo, inf);
return foo;
}
fimg_clone(&src, &dst, 0);
/* run the crappy code */
foo = fimg_mirror(&src, &dst, 0);
if (foo) {
fprintf(stderr, "err %d in fimg_mirrot\n", foo);
return -6;
}
foo = fimg_export_picture(&dst, outf, 0);
if (foo) {
fprintf(stderr, "%s : err %d saving result\n", __func__, foo);
return foo;
}
return -1;
}
/* --------------------------------------------------------------------- */
/* nouveau 21 mars 2021 - rue d'Aragon */
int essai_openexr(char *inf, char *outf, int flags)