summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2016-02-02 15:24:51 +0100
committerMatthias Schiffer <mschiffer@universe-factory.net>2016-02-02 15:24:51 +0100
commitee2f39cbb235da0ceab44c1a027e3f7af6e41d6d (patch)
tree78f4934742b1ef31144a7abe392c09257546f159
parent6f023066fc9712c5bbed1b0220439e304b13f10c (diff)
downloadglslview-ee2f39cbb235da0ceab44c1a027e3f7af6e41d6d.tar
glslview-ee2f39cbb235da0ceab44c1a027e3f7af6e41d6d.zip
glslwrite: fix vertical flip of saved images
-rw-r--r--glslview.c2
1 files changed, 1 insertions, 1 deletions
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);