add TIFF support to grabvidseq

This commit is contained in:
tth 2020-08-23 17:21:10 +02:00
parent c2bc5e1ba9
commit ed55a37bfe
3 changed files with 7 additions and 4 deletions

View File

@ -61,6 +61,7 @@ if (!strcasecmp(cptr, ".fimg")) return FILE_TYPE_FIMG;
if (!strcasecmp(cptr, ".tga" )) return FILE_TYPE_TGA; if (!strcasecmp(cptr, ".tga" )) return FILE_TYPE_TGA;
if (!strcasecmp(cptr, ".png" )) return FILE_TYPE_PNG; if (!strcasecmp(cptr, ".png" )) return FILE_TYPE_PNG;
if (!strcasecmp(cptr, ".tiff")) return FILE_TYPE_TIFF; if (!strcasecmp(cptr, ".tiff")) return FILE_TYPE_TIFF;
if (!strcasecmp(cptr, ".tif" )) return FILE_TYPE_TIFF;
if (!strcasecmp(cptr, ".fits")) return FILE_TYPE_FITS; if (!strcasecmp(cptr, ".fits")) return FILE_TYPE_FITS;
return -1; return -1;

View File

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

View File

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