diff options
author | Thomas White <taw@bitwiz.org.uk> | 2010-05-06 13:14:33 -0700 |
---|---|---|
committer | Thomas White <taw@bitwiz.org.uk> | 2010-05-06 13:14:33 -0700 |
commit | 416ebc0310c4e3e5c48be409ee64aeb1dc2b3ced (patch) | |
tree | 179bc253f7b102f62d736a7a68ecf0d72d7a1c89 /src/render.c | |
parent | 8e8f56544fa1da07c97a8125cb700bdcbdc97e53 (diff) |
hdfsee: Use selected colour scale for PNG output
Diffstat (limited to 'src/render.c')
-rw-r--r-- | src/render.c | 20 |
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; |