add TIFF support to grabvidseq

master
tth 2 years ago
parent c2bc5e1ba9
commit ed55a37bfe
  1. 7
      funcs/utils.c
  2. 2
      v4l2/Makefile
  3. 2
      v4l2/grabvidseq.c

@ -56,11 +56,12 @@ if (NULL==cptr) {
fprintf(stderr, "[%s] --> [%s]\n", fname, cptr);
#endif
if (!strcasecmp(cptr, ".pnm")) return FILE_TYPE_PNM;
if (!strcasecmp(cptr, ".pnm" )) return FILE_TYPE_PNM;
if (!strcasecmp(cptr, ".fimg")) return FILE_TYPE_FIMG;
if (!strcasecmp(cptr, ".tga")) return FILE_TYPE_TGA;
if (!strcasecmp(cptr, ".png")) return FILE_TYPE_PNG;
if (!strcasecmp(cptr, ".tga" )) return FILE_TYPE_TGA;
if (!strcasecmp(cptr, ".png" )) return FILE_TYPE_PNG;
if (!strcasecmp(cptr, ".tiff")) return FILE_TYPE_TIFF;
if (!strcasecmp(cptr, ".tif" )) return FILE_TYPE_TIFF;
if (!strcasecmp(cptr, ".fits")) return FILE_TYPE_FITS;
return -1;

@ -20,7 +20,7 @@ v4l2_pr_structs.o: v4l2_pr_structs.c v4l2_pr_structs.h Makefile
grabvidseq: grabvidseq.c ${DEPS} rgb2fimg.o
gcc ${COPT} $< rgb2fimg.o ../libfloatimg.a -lpnglite -lz -lm \
-lcfitsio -lv4l2 -o $@
-lcfitsio -lv4l2 -ltiff -o $@
video-infos: video-infos.c Makefile funcs.o v4l2_pr_structs.o
gcc -Wall -g $< ${LOBJ} ../libfloatimg.a -o $@

@ -396,6 +396,8 @@ switch (foo) {
case FILE_TYPE_FITS:
foo = fimg_save_R_as_fits(to_save, outfile, 0);
break;
case FILE_TYPE_TIFF:
foo = fimg_write_as_tiff(to_save, outfile, 0);
default:
fprintf(stderr, "can't save as %s\n", outfile);
break;

Loading…
Cancel
Save