fimgextract can now copy metadata
This commit is contained in:
parent
e00c6b8fb2
commit
bdfb3e279d
@ -11,6 +11,20 @@
|
||||
|
||||
int verbosity; // nasty global var.
|
||||
|
||||
/* --------------------------------------------------------------------- */
|
||||
int copy_metadata(FloatImg *src, FloatImg *dst)
|
||||
{
|
||||
FimgMetaData *mdsrc, *mddst;
|
||||
|
||||
#if DEBUG_LEVEL
|
||||
fprintf(stderr, ">>> %s ( %p %p )\n", __func__, src, dst);
|
||||
#endif
|
||||
|
||||
mdsrc = &(src->mdatas); mddst = &(dst->mdatas);
|
||||
fprintf(stderr, "metadata copy: %p --> %p\n", mdsrc, mddst);
|
||||
|
||||
return 0;
|
||||
}
|
||||
/* --------------------------------------------------------------------- */
|
||||
/* nouveau ~ 2 octobre 2022 */
|
||||
int extractor(char *srcname, char *dstname, FimgArea51 *rect)
|
||||
@ -48,10 +62,13 @@ if (foo) {
|
||||
#endif
|
||||
return foo;
|
||||
}
|
||||
/* XXX
|
||||
* may be we can also copy the metadate from src to dst ?
|
||||
* with an option on the command line ?
|
||||
*/
|
||||
copy_metadata(&src, &dst);
|
||||
|
||||
// debug code XXX (void)fimg_save_as_pnm(&dst, "f.pnm", 0);
|
||||
|
||||
foo = fimg_dump_to_file(&dst, dstname, 0);
|
||||
foo = fimg_dumpmd_to_file(&dst, dstname, NULL, 0);
|
||||
if (foo) {
|
||||
fprintf(stderr, "%s: dumping datas to '%s' give us a %d\n",
|
||||
__func__, dstname, foo);
|
||||
@ -69,6 +86,7 @@ printf("-- Fimg Extractor -- lib v%d -- %s %s\n", FIMG_VERSION,
|
||||
|
||||
puts("usage:\n\tfimgextract [options] source.fimg width,height,xpos,ypos");
|
||||
puts("options:");
|
||||
puts("\t-m\t\tcopy metadata bloc");
|
||||
puts("\t-o out.fimg\tname the output file");
|
||||
puts("\t-v\t\tmake me a blabla box");
|
||||
puts("\t-x\t\tenable crashy feature");
|
||||
|
Loading…
Reference in New Issue
Block a user