various enhancements

This commit is contained in:
tTh 2024-08-29 18:24:01 +02:00
parent 2a8348f0f9
commit d510e56d44

View File

@ -32,21 +32,23 @@ if (foo) {
fimg_destroy(&fimg);
return -1;
return 0;
}
/* ----------------------------------------------------------------- */
static void help(int k)
{
puts("export to FITS format");
puts("\t-p select colorplane : R, G, B");
puts("\t default is blue");
puts("\t-v increase verbosity");
fimg_print_version(k);
}
/* ----------------------------------------------------------------- */
int main(int argc, char *argv[])
{
int opt;
int plane = '?';
int opt, foo;
int plane = 'b';
while ((opt = getopt(argc, argv, "p:hv")) != -1) {
switch(opt) {
@ -62,8 +64,11 @@ if (2 != argc-optind) {
exit(1);
}
export_fimg_plane_as_fits(argv[optind], argv[optind+1], plane);
foo = export_fimg_plane_as_fits(argv[optind], argv[optind+1], plane);
if (foo) {
fprintf(stderr, "export_fimg_plane_as_fits --> %d\n", foo);
exit(1);
}
return 0;
}
/* ----------------------------------------------------------------- */