Compare commits

..

No commits in common. "d4d2dcc7f50480e2f0e0f3d2952e84216517ae29" and "ed864ea45a12686a66a4afbc81e1d44b4d3db9a7" have entirely different histories.

3 changed files with 10 additions and 18 deletions

View File

@ -3,7 +3,7 @@
* ugly code from tTh
*/
#define FIMG_VERSION 102
#define FIMG_VERSION 101
/*
* in memory descriptor

View File

@ -15,7 +15,7 @@ extern int verbosity;
int fimg_rotate_90(FloatImg *src, FloatImg *dst, int notused)
{
int foo;
int x, y, j, k;
int x, y;
float rgb[3];
#if DEBUG_LEVEL
@ -40,7 +40,7 @@ if ( 0 == (dst->type | dst->width | dst->height) ) {
fprintf(stderr, "%s: err %d create new pic\n", __func__, foo);
return -887;
}
// if (verbosity>1) fimg_describe(dst, "new pic");
if (verbosity) fimg_describe(dst, "new pic");
}
/* check if dst and src are conpatibles */
@ -56,12 +56,7 @@ if ( (src->type != dst->type) ||
for (y=0; y<src->height; y++) {
for (x=0; x<src->width; x++) {
fimg_get_rgb(src, x, y, rgb);
j = (dst->height - x) - 1;
k = (dst->width - y) - 1;
#if DEBUG_LEVEL > 1
fprintf(stderr, "%6d %6d\n", k, j);
#endif
fimg_put_rgb(dst, k, x, rgb);
fimg_put_rgb(dst, y, x, rgb);
}
}

View File

@ -77,7 +77,6 @@ puts("\t-n NNN\t\thow many frames ?");
puts("\t-O ./\t\tset Output dir");
puts("\t-o bla.xxx\tset output filename");
puts("\t-p NN.N\t\tperiod in seconds");
puts("\t-r NNN\t\trotate picture");
puts("\t-s WxH\t\tsize of capture");
puts("\t-c mode\t\tcontrast enhancement");
puts("\t-u\t\ttry upscaling...");
@ -158,9 +157,8 @@ while ((opt = getopt(argc, argv, "c:d:ghn:o:O:p:r:s:uv")) != -1) {
}
if (verbosity > 1) {
fprintf(stderr, "*** GrabVidSeq (%s, %s) pid=%d\n",
__DATE__, __TIME__, getpid());
fprintf(stderr, "grabing %d picz, ", nbre_capt);
fprintf(stderr, "GrabVidSeq (%s, %s) pid=%d\n", __DATE__, __TIME__, getpid());
fprintf(stderr, "grabing %d picz\n", nbre_capt);
fprintf(stderr, "period is %.3f milliseconds\n", period/1e3);
fprintf(stderr, "framesize is %dx%d\n", width, height);
fprintf(stderr, "destdir is '%s'\n", dest_dir);
@ -370,11 +368,10 @@ switch (contrast) {
}
/* XXX warning, new from coronahome 26 mars 2020 */
to_save = &cumul;
if (90 == rotfactor) {
memset(&tmpfimg, 0, sizeof(FloatImg));
foo = fimg_rotate_90(&cumul, &tmpfimg, 0);
if (verbosity > 2) {
if (verbosity > 1) {
fprintf(stderr, "dump rot90 %p\n", &tmpfimg);
foo = fimg_save_as_png(&tmpfimg, "rot90.png", 0);
}
@ -385,13 +382,13 @@ if (90 == rotfactor) {
foo = format_from_extension(outfile);
switch (foo) {
case FILE_TYPE_FIMG:
foo = fimg_dump_to_file(to_save, outfile, 0);
foo = fimg_dump_to_file(&cumul, outfile, 0);
break;
case FILE_TYPE_PNM:
foo = fimg_save_as_pnm(to_save, outfile, 1);
foo = fimg_save_as_pnm(&cumul, outfile, 1);
break;
case FILE_TYPE_PNG:
foo = fimg_save_as_png(to_save, outfile, 0);
foo = fimg_save_as_png(&cumul, outfile, 0);
break;
default:
fprintf(stderr, "can't save as %s\n", outfile);