aboutsummaryrefslogtreecommitdiff
path: root/src/render.c
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2010-05-06 13:14:33 -0700
committerThomas White <taw@bitwiz.org.uk>2010-05-06 13:14:33 -0700
commit416ebc0310c4e3e5c48be409ee64aeb1dc2b3ced (patch)
tree179bc253f7b102f62d736a7a68ecf0d72d7a1c89 /src/render.c
parent8e8f56544fa1da07c97a8125cb700bdcbdc97e53 (diff)
hdfsee: Use selected colour scale for PNG output
Diffstat (limited to 'src/render.c')
-rw-r--r--src/render.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/src/render.c b/src/render.c
index 2307b381..f76e4a14 100644
--- a/src/render.c
+++ b/src/render.c
@@ -394,8 +394,24 @@ int render_png(DisplayWindow *dw, const char *filename)
val = hdr[x+w*y];
- RENDER_RGB
-
+ switch ( dw->scale ) {
+ case SCALE_COLOUR : {
+ RENDER_RGB
+ break;
+ }
+ case SCALE_MONO : {
+ RENDER_MONO
+ break;
+ }
+ case SCALE_INVMONO : {
+ RENDER_INVMONO
+ break;
+ }
+ default : {
+ RENDER_RGB;
+ break;
+ }
+ }
row_pointers[y][3*x] = (png_byte)r;
row_pointers[y][3*x+1] = (png_byte)g;
row_pointers[y][3*x+2] = (png_byte)b;