aboutsummaryrefslogtreecommitdiff
path: root/src/render.c
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2009-12-16 10:36:53 -0800
committerThomas White <taw@bitwiz.org.uk>2009-12-16 10:36:53 -0800
commitd84fd5ff386a1393bbec3b67c8f165c95613a53e (patch)
treefcba5c62793a58522f17a3a860f997abc2e72ecc /src/render.c
parent5ee02bbd3e86bb6b83a457009ed0a4b5d864dec9 (diff)
Add number-viewing window, use signed values as well
Diffstat (limited to 'src/render.c')
-rw-r--r--src/render.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/render.c b/src/render.c
index 26deae91..bf6c0256 100644
--- a/src/render.c
+++ b/src/render.c
@@ -89,9 +89,9 @@ GdkPixbuf *render_get_image(struct hdfile *hdfile, int binning, int boostint,
{
int mw, mh, w, h;
guchar *data;
- uint16_t *hdr;
+ int16_t *hdr;
size_t x, y;
- uint16_t max;
+ int16_t max;
mw = hdfile_get_width(hdfile);
mh = hdfile_get_height(hdfile);
@@ -110,7 +110,7 @@ GdkPixbuf *render_get_image(struct hdfile *hdfile, int binning, int boostint,
}
max /= boostint;
- if ( max <= 0.0 ) { max = 10.0; }
+ if ( max <= 6 ) { max = 10; }
/* These x,y coordinates are measured relative to the bottom-left
* corner */
for ( y=0; y<h; y++ ) {