summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2ca6f2c)
raw | patch | inline | side by side (parent: 2ca6f2c)
author | Rekhesh Mohan <reks@iiap.res.in> | |
Mon, 22 Oct 2012 13:49:38 +0000 (19:19 +0530) | ||
committer | Rekhesh Mohan <reks@iiap.res.in> | |
Mon, 22 Oct 2012 13:49:38 +0000 (19:19 +0530) |
configure.ac | patch | blob | history | |
src/image.c | patch | blob | history |
diff --git a/configure.ac b/configure.ac
--- a/configure.ac
+++ b/configure.ac
-AC_INIT([CADS_fits2jpeg], [1.99], [cads@iiap.res.in])
+AC_INIT([CADS_fits2jpeg], [2.0.9], [cads@iiap.res.in])
AC_LANG_C
AM_INIT_AUTOMAKE([-Wall -Werror])
AC_CONFIG_SRCDIR([config.h.in])
diff --git a/src/image.c b/src/image.c
--- a/src/image.c
+++ b/src/image.c
/* the dynamic range is reduced to 255 for jpeg */
scl_data = (datamax - datamin)/(float)JMAXVAL;
+ /* we will end up with segfaults if scl_data = 0 */
+ if (scl_data = 0) scl_data = 1;
+
for (i = 0; i < npixels; ++i)
data[i] = (data[i] - datamin)/scl_data;