From 185c77b9d4d79c8e757ac47e63ab9d7e5daafb30 Mon Sep 17 00:00:00 2001 From: Vasiliy Vylegzhanin Date: Fri, 11 Aug 2017 00:40:42 +0300 Subject: [PATCH] unflip image --- tgp-2prpl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tgp-2prpl.c b/tgp-2prpl.c index 5e9dd80..c207e27 100644 --- a/tgp-2prpl.c +++ b/tgp-2prpl.c @@ -261,7 +261,7 @@ int p2tgl_imgstore_add_with_id_png (const unsigned char *raw_bitmap, unsigned wi unsigned i; for (i = 0; i < height; i++) - rows[i] = (png_bytep)(raw_bitmap + (height - i) * width * 4); + rows[i] = (png_bytep)(raw_bitmap + i * width * 4); // set own png write function png_set_write_fn (png_ptr, &state, p2tgl_png_mem_write, NULL);