Browse Source

add stdlib.h include

tags/v1.7^0
Thierry Leconte 19 years ago
parent
commit
628948c416
4 changed files with 10 additions and 7 deletions
  1. +3
    -3
      README
  2. +1
    -1
      image.c
  3. +5
    -2
      main.c
  4. +1
    -1
      version.h

+ 3
- 3
README View File

@@ -1,5 +1,5 @@


ATPDEC README (Thierry Leconte 2004)
ATPDEC README (Thierry Leconte F4DWV (c) 2004-2005)


DESCRIPTION DESCRIPTION


@@ -53,9 +53,9 @@ OPTIONS
Default : soundfile directory. Default : soundfile directory.


-s n -s n
Satellite ident : n=0 :NOOA-15 n=1 :NOAA-17
Satellite number 15 to 18
Used for Temperature compensation. Used for Temperature compensation.
Default : NOAA17
Default : NOAA15


-c conf_file -c conf_file
Use configuration file for false color generation. Use configuration file for false color generation.


+ 1
- 1
image.c View File

@@ -221,7 +221,7 @@ const struct {
float Ns; float Ns;
float b[3]; float b[3];
} cor[3]; } cor[3];
} satcal[2] =
} satcal[4] =
#include "satcal.h" #include "satcal.h"


typedef struct { typedef struct {


+ 5
- 2
main.c View File

@@ -20,6 +20,7 @@
* *
*/ */


#include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#ifdef WIN32 #ifdef WIN32
#include "w32util.h" #include "w32util.h"
@@ -149,7 +150,7 @@ int ImageColorOut(char *filename, float **prow, int nrow)
png_infop info_ptr; png_infop info_ptr;
png_structp png_ptr; png_structp png_ptr;
int n; int n;
float *pixelc;
float *pixelc, *pixelp;


extern void falsecolor(double v, double t, float *r, float *g, extern void falsecolor(double v, double t, float *r, float *g,
float *b); float *b);
@@ -189,10 +190,12 @@ int ImageColorOut(char *filename, float **prow, int nrow)
png_init_io(png_ptr, pngfile); png_init_io(png_ptr, pngfile);
png_write_info(png_ptr, info_ptr); png_write_info(png_ptr, info_ptr);


pixelc=prow[0];
for (n = 0; n < nrow ; n++) { for (n = 0; n < nrow ; n++) {
png_color pix[CH_WIDTH]; png_color pix[CH_WIDTH];
int i; int i;


pixelp=pixelc;
pixelc = prow[n]; pixelc = prow[n];


for (i = 0; i < CH_WIDTH - 1; i++) { for (i = 0; i < CH_WIDTH - 1; i++) {
@@ -200,7 +203,7 @@ int ImageColorOut(char *filename, float **prow, int nrow)
float r, g, b; float r, g, b;


v = pixelc[i+SYNC_WIDTH + SPC_WIDTH]; v = pixelc[i+SYNC_WIDTH + SPC_WIDTH];
t = pixelc[i+SYNC_WIDTH + SPC_WIDTH + CH_OFFSET];
t = (2.0*pixelc[i+SYNC_WIDTH + SPC_WIDTH + CH_OFFSET]+pixelp[i+SYNC_WIDTH + SPC_WIDTH + CH_OFFSET])/3.0;


falsecolor(v, t, &r, &g, &b); falsecolor(v, t, &r, &g, &b);




+ 1
- 1
version.h View File

@@ -1,2 +1,2 @@
const char version[]="Atpdec 1.6 (c) 2004 Thierry Leconte F4DWV";
const char version[]="Atpdec 1.7 (c) 2004-2005 Thierry Leconte F4DWV";



Loading…
Cancel
Save