From 5ee02bbd3e86bb6b83a457009ed0a4b5d864dec9 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Wed, 16 Dec 2009 03:44:35 -0800 Subject: Fix binning --- src/hdf5-file.c | 6 +++--- src/render.c | 32 ++++++++++++++++---------------- 2 files changed, 19 insertions(+), 19 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 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)]; } } diff --git a/src/render.c b/src/render.c index 96e0b906..26deae91 100644 --- a/src/render.c +++ b/src/render.c @@ -114,26 +114,26 @@ GdkPixbuf *render_get_image(struct hdfile *hdfile, int binning, int boostint, /* These x,y coordinates are measured relative to the bottom-left * corner */ for ( y=0; y