aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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;