From ee20160e6d5340015f357659b7fdce81ca7cb905 Mon Sep 17 00:00:00 2001 From: Steve Tang Date: Wed, 11 May 2016 11:37:17 +0800 Subject: [PATCH] fix wrong components problem in png loading --- stb_image.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stb_image.h b/stb_image.h index a3c1129..a6cc4c4 100644 --- a/stb_image.h +++ b/stb_image.h @@ -4606,7 +4606,7 @@ static unsigned char *stbi__do_png(stbi__png *p, int *x, int *y, int *n, int req } *x = p->s->img_x; *y = p->s->img_y; - if (n) *n = p->s->img_n; + if (n) *n = p->s->img_out_n; } STBI_FREE(p->out); p->out = NULL; STBI_FREE(p->expanded); p->expanded = NULL;