Skip to content
Myr

fix handling of tRNS chunk in PNG (used wrong variable for output channels)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Sean Barrett · committed by Sean Barrett · parent 492e3f3 · Browse files · 1 file+6 added−3 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+6 added−3 removed

  • other:+6 added−3 removed

1 file+6 added−3 removed

modified:stb_image.h+6 added-3 removed
1/* stb_image - v1.45 - public domain JPEG/PNG reader - http://nothings.org/stb_image.c1/* stb_image - v1.46 - public domain JPEG/PNG reader - http://nothings.org/stb_image.c2 when you control the images you're loading3 no warranty implied; use at your own risk45 Do this:
21 unmodified lines
27 - decode from arbitrary I/O callbacks28 - overridable dequantizing-IDCT, YCbCr-to-RGB conversion (define STBI_SIMD)2930 Latest revisions:31 1.46 (2014-08-26) fix broken tRNS chunk in non-paletted PNG32 1.45 (2014-08-16) workaround MSVC-ARM internal compiler error by wrapping malloc33 1.44 (2014-08-07) warnings34 1.43 (2014-07-15) fix MSVC-only bug in 1.4235 1.42 (2014-07-09) no _CRT_SECURE_NO_WARNINGS; error-path fixes; STBI_ASSERT
2845 unmodified lines
2881 if (result == NULL) return result;2882 }2883 *x = p->s->img_x;2884 *y = p->s->img_y;2884 if (n) *n = p->s->img_n;2885 if (n) *n = p->s->img_out_n;2886 }2887 free(p->out); p->out = NULL;2888 free(p->expanded); p->expanded = NULL;2889 free(p->idata); p->idata = NULL;
1674 unmodified lines
4564#endif // STB_IMAGE_IMPLEMENTATION45654566/*4567 revision history:4568 1.46 (2014-08-26)4569 fix broken tRNS chunk (colorkey-style transparency) in non-paletted PNG4567 1.44 (2014-08-16)4570 1.45 (2014-08-16)4571 fix MSVC-ARM internal compiler error by wrapping malloc4572 1.44 (2014-08-07)4573 various warning fixes from Ronny Chevalier4574 1.43 (2014-07-15)
113 unmodified lines