diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2016-02-02 15:24:51 +0100 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2016-02-02 15:24:51 +0100 |
commit | ee2f39cbb235da0ceab44c1a027e3f7af6e41d6d (patch) | |
tree | 78f4934742b1ef31144a7abe392c09257546f159 | |
parent | 6f023066fc9712c5bbed1b0220439e304b13f10c (diff) | |
download | glslview-ee2f39cbb235da0ceab44c1a027e3f7af6e41d6d.tar glslview-ee2f39cbb235da0ceab44c1a027e3f7af6e41d6d.zip |
glslwrite: fix vertical flip of saved images
-rw-r--r-- | glslview.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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); |