1 /***************************************************************************
2 * This file is a part of CADS/UVS fits2jpeg conversion software *
3 * Copyright (C) 2012 by CADS/UV Software Team, *
4 * Indian Institute of Astrophysics *
5 * Bangalore 560034 *
6 * cads_AT_iiap.res.in *
7 * *
8 * This program is free software; you can redistribute it and/or modify *
9 * it under the terms of the GNU General Public License as published by *
10 * the Free Software Foundation; either version 2 of the License, or *
11 * (at your option) any later version. *
12 * *
13 * This program is distributed in the hope that it will be useful, *
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
16 * GNU General Public License for more details. *
17 * *
18 * You should have received a copy of the GNU General Public License *
19 * along with this program; if not, write to the *
20 * Free Software Foundation, Inc., *
21 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
22 ***************************************************************************/
24 #ifdef HAVE_CONFIG_H
25 #include <config.h>
26 #endif
28 /*Header Definitions*/
29 #include <stdio.h>
30 #include <stdlib.h>
31 #include <string.h>
32 #include <float.h>
33 #include <ctype.h>
34 #include <math.h>
35 #include <libgen.h>
36 #include <dirent.h>
37 #include <fitsio2.h>
38 #include <jpeglib.h>
40 #define PROGRAM "fits2jpeg"
41 #define r2d (90./atan2(1,0))
42 #define MAX_TEXT 150
44 int my_getopt(int, char * const *, const char *);
45 void signals_handler(int);
46 void set_signals(void);
47 void printinfo(const char *);
48 void printwarn(const char *);
49 void printerro(const char *);
50 void scale_pixels(int, unsigned int, float *, JSAMPLE *);
51 void resize_image(long *, long *, float, JSAMPLE *);