return correct # of channels for PNG

This commit is contained in:
Sean Barrett 2016-04-02 03:49:46 -07:00
parent 65edb64dd8
commit 201af99d9f

View File

@ -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_out_n;
if (n) *n = p->s->img_n;
}
STBI_FREE(p->out); p->out = NULL;
STBI_FREE(p->expanded); p->expanded = NULL;