index 75f890c..ed4063e 100644 (file)
@@ -25,7 +25,7 @@
 #include "fits2jpeg.h"
 
 /*---------------------------------------------------------------------------*/
-void PRINT_BANNER()
+void banner()
 {
     printf("\n");
     printf(" %s %s\n", PROGRAM, VERSION);
@@ -36,8 +36,10 @@ void PRINT_BANNER()
 void usage()
 {
     printf ("\n Usage: fits2jpeg [options] <fits_file>\n");
-    printf ("  Options are:                                             \n");
+    printf ("          Name of fits image file <fits_file> is mandatory.\n");
+    printf ("          Optional parameters are listed below: \n\n");
     printf ("    -h help                                                \n");
+    printf ("       Print this help message and exit                    \n\n");
     printf ("    -s <scale_type>                                        \n");
     printf ("       scale for output image, where <scale_type> can be:  \n");
     printf ("         linear         Linear scale, default              \n");
@@ -46,25 +48,29 @@ void usage()
     printf ("         cubic          for cubic scale                    \n");
     printf ("         log            for log scale                      \n");
     printf ("         normalize      for linear histogram stretch       \n");
-    printf ("         equalize       for histogram equalization         \n");
+    printf ("         equalize       for histogram equalization         \n\n");
+    printf ("    -n                                                     \n");
+    printf ("       Negate the image                                    \n\n");
+    printf ("    -q <value>                                             \n");
+    printf ("       quality factor. Defines the jpeg encoding quality   \n");
+    printf ("       Valid range: 0-100, default value: 100 (max.quality)\n\n");
+    printf ("    -d <path/to/output/directory>                          \n");
+    printf ("       Write jpeg file to this specified directory. Will   \n");
+    printf ("       create it if needed. Default is to write jpeg in the\n");
+    printf ("       same directory as fits image file                   \n\n");
     printf ("    -r <min>:<max>                                         \n");
     printf ("       Clip output image to min-max range. Eg:             \n");
     printf ("         0:100          Use only values in the range 0-100 \n");
     printf ("         100:0          Same as above, but negative image  \n");
     printf ("           :10          Clip everything above 10           \n");
-    printf ("         10:            Clip everything below 10           \n");
-    printf ("    -n                                                     \n");
-    printf ("       Negate the image                                    \n");
-    printf ("    -q <value>                                             \n");
-    printf ("       quality factor. Defines the jpeg encoding quality   \n");
-    printf ("       Valid range: 0-100, default value: 100 (max.quality)\n");
+    printf ("         10:            Clip everything below 10           \n\n");
     printf ("    -z <zoomfactor>                                        \n");
     printf ("       Resize/Scale output image by <zoomfactor>. Eg:      \n");
     printf ("         0.5            Shrink output to half of input     \n");
     printf ("         2.0            Magnify output to double the size  \n");
     printf ("                        Allowed range: 0.01 to 4.0         \n");
     printf ("       NOTE: Zooming will be carried out after all other   \n");
-    printf ("             operations, before writing out jpeg image     \n");
+    printf ("             operations, before writing out jpeg image     \n\n");
     printf ("  Output will be written to <fits_file_root>.jpg. Wild card\n");
     printf ("  entries allowed in <fits_file>; For eg: *.fits, m31*.fits\n");
     printf ("  ngc???.fits etc.                                         \n");