From a92659f65cca584b34735d8a754782207d06fea2 Mon Sep 17 00:00:00 2001 From: homm Date: Tue, 16 Aug 2016 15:22:54 +0200 Subject: [PATCH] =?UTF-8?q?fix=20RGBa=20=E2=86=92=C2=A0RGBA=20conversion?= =?UTF-8?q?=20on=20AVX2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/libImaging/Convert.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/libImaging/Convert.c b/src/libImaging/Convert.c index 293f1886d..9d9c97d28 100644 --- a/src/libImaging/Convert.c +++ b/src/libImaging/Convert.c @@ -583,7 +583,10 @@ rgba2rgbA(UINT8* out, const UINT8* in, int xsize) #endif - for (; x < xsize; x++, in+=4) { + in = &in[x * 4]; + out = &out[x * 4]; + + for (; x < xsize; x++, in += 4) { alpha = in[3]; if (alpha == 255 || alpha == 0) { *out++ = in[0];