diff options
Diffstat (limited to 'src/hdf5-file.c')
-rw-r--r-- | src/hdf5-file.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/hdf5-file.c b/src/hdf5-file.c index 379bd14e..94845025 100644 --- a/src/hdf5-file.c +++ b/src/hdf5-file.c @@ -127,13 +127,13 @@ static void *hdfile_bin(uint16_t *in, int inw, int inh, for ( xb=0; xb<binning; xb++ ) { for ( yb=0; yb<binning; yb++ ) { - total += in[inh*(binning*x+xb)+((inh-binning*y)+yb)]; + total += in[inh*(binning*x+xb)+binning*y+yb]; } } - data[x+w*y] = total / (binning * binning); - if ( data[x+w*y] > max ) max = data[x+w*y]; + data[y+h*(w-1-x)] = total / (binning * binning); + if ( data[y+h*(w-1-x)] > max ) max = data[y+h*(w-1-x)]; } } |