From ac7f36a559396b2acae2bec3302078ac49b9eb1a Mon Sep 17 00:00:00 2001 From: Daniel <790119+DanTheMan827@users.noreply.github.com> Date: Thu, 30 Nov 2017 21:37:38 -0600 Subject: Swap red / blue and output twice --- decodepng.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/decodepng.c b/decodepng.c index 907be9a..5d75bc3 100644 --- a/decodepng.c +++ b/decodepng.c @@ -2,6 +2,23 @@ #include #include "lodepng/lodepng.h" +static inline void rgbSwap(unsigned char*buf) +{ + unsigned char t; + t=buf[0]; + buf[0]=buf[2]; + buf[2]=t; + buf[3]=0; +} + +static void rgbSwapImage(unsigned char*buf,unsigned len) +{ + for(unsigned i=0;i