Compare commits

..

No commits in common. "91440e7ea52b24212a2239fc19eee096545e8b0a" and "d510e56d4406e7f342998ad4806230927aa9e776" have entirely different histories.

4 changed files with 5 additions and 24 deletions

View File

@ -514,11 +514,6 @@ switch (idFx) {
retval = fimg_to_gray(image);
break;
case CR_shift0:
/* added Sun Sep 29 16:55:54 UTC 2024 */
retval = fimg_auto_shift_to_zero(image, image);
// fprintf(stderr, "******** Shift Zero -> %d\n", retval);
break;
default :
fprintf(stderr, "%s : effect #%d invalid\n",

View File

@ -47,6 +47,5 @@
80 thermocol 1 0
81 triptyq 1 0
90 togray 1 0
91 shift0 1 0
-1 end 1 1.0

View File

@ -6,14 +6,12 @@
#include <stdlib.h>
#include <unistd.h>
#include <stdint.h>
#include <string.h>
#include "../floatimg.h"
int verbosity; // nasty global var.
/* --------------------------------------------------------------------- */
/* nouveau - Mon Apr 8 11:52:18 UTC 2024 */
int copy_metadata(FloatImg *src, FloatImg *dst)
{
FimgMetaData *mdsrc, *mddst;
@ -23,10 +21,7 @@ fprintf(stderr, ">>> %s ( %p %p )\n", __func__, src, dst);
#endif
mdsrc = &(src->mdatas); mddst = &(dst->mdatas);
if (verbosity) fprintf(stderr, "%s: %p --> %p\n", __func__, mdsrc, mddst);
mdsrc->reserved[1] = 0x55555555;
memcpy(mddst, mdsrc, sizeof(FimgMetaData));
fprintf(stderr, "metadata copy: %p --> %p\n", mdsrc, mddst);
return 0;
}
@ -67,12 +62,11 @@ 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 ?
*/
foo = copy_metadata(&src, &dst);
copy_metadata(&src, &dst);
foo = fimg_dumpmd_to_file(&dst, dstname, NULL, 0);
if (foo) {
@ -111,7 +105,6 @@ char *output_file = "out.fimg";
while ((opt = getopt(argc, argv, "ho:vx")) != -1) {
switch(opt) {
case 'h': help(); break;
case 'm': break;
case 'o': output_file = optarg; break;
case 'v': verbosity++; break;
case 'x': experiment++; break;

View File

@ -16,7 +16,7 @@
int verbosity;
enum comId { C_timestamp, C_daytime, C_count, C_fval, C_cpid, C_origin,
C_idcam, C_reserved, C_all, C_dayhour };
C_idcam, C_reserved, C_all };
typedef struct {
char *name;
@ -26,7 +26,6 @@ typedef struct {
Cmd Cmd_list[] = {
{ "timestamp", C_timestamp },
{ "daytime", C_daytime },
{ "dayhour", C_dayhour },
{ "cpid", C_cpid },
{ "count", C_count },
{ "fval", C_fval },
@ -87,7 +86,6 @@ int get_print_metadata(char *fname, char *command)
{
int foo, action;
FimgMetaData metadata;
time_t tstamp;
#if DEBUG_LEVEL
fprintf(stderr, ">>> %s ( '%s' '%s' )\n", __func__, fname, command);
@ -100,15 +98,11 @@ if (foo) return foo;
action = lookup_cmd(command);
// fprintf(stderr, " command '%s' -> %d\n", command, action);
tstamp = metadata.timestamp.tv_sec;
switch(action) {
case C_timestamp:
printf("timestamp %ld\n", tstamp); break;
printf("timestamp %ld\n", metadata.timestamp.tv_sec); break;
case C_daytime:
printf("%s\n", ctime(&tstamp)); break;
case C_dayhour:
printf("%s\n", ctime(&tstamp)); break;
printf("%s\n", ctime(&metadata.timestamp.tv_sec)); break;
case C_count:
printf("count %d\n", metadata.count); break;
case C_fval: