From ee2f39cbb235da0ceab44c1a027e3f7af6e41d6d Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Tue, 2 Feb 2016 15:24:51 +0100 Subject: glslwrite: fix vertical flip of saved images --- glslview.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glslview.c b/glslview.c index fd0b180..1bb84e2 100644 --- a/glslview.c +++ b/glslview.c @@ -207,7 +207,7 @@ static void savePNG(int width, int height, const char *output_dir) { uint8_t *row_pointers[height]; for (size_t i = 0; i < height; i++) - row_pointers[i] = &pixels[4*i*width]; + row_pointers[i] = &pixels[4*(height-1-i)*width]; png_set_rows(png_ptr, info_ptr, row_pointers); png_write_png(png_ptr, info_ptr, PNG_TRANSFORM_IDENTITY, NULL); -- cgit v1.2.3