Skip to content
Myr

fix missing "defined" in #if defined(STBI_NO_foo);

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

fix incorrect initialization of alpha channel for RGB PSD

authored by Sean Barrett · committed by Sean Barrett · parent 023ff3f · Browse files · 2 files+13 added−4 removed
This commit

State

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

Diff stats

2 files+13 added−4 removed

  • tests:+4 added−0 removed
  • other:+9 added−4 removed

2 files+13 added−4 removed

modified:tests/stb.dsp+4 added
104 unmodified lines
105SOURCE=..\stb_dxt.h106# End Source File107# Begin Source File108109SOURCE=..\stb_easy_font.h110# End Source File111# Begin Source File112113SOURCE=..\stb_herringbone_wang_tile.h114# End Source File115# Begin Source File116
68 unmodified lines
modified:stb_image.h+9 added-4 removed
1/* stb_image - v2.07 - public domain image loader - http://nothings.org/stb_image.h1/* stb_image - v2.08 - public domain image loader - http://nothings.org/stb_image.h2 no warranty implied; use at your own risk34 Do this:5 #define STB_IMAGE_IMPLEMENTATION
139 unmodified lines
145 near-term back-compatibility use.146147148 Latest revision history:149 2.08 (2015-09-13) fix to 2.07 cleanup, reading RGB PSD as RGBA150 2.07 (2015-09-13) partial animated GIF support151 limited 16-bit PSD support152 minor bugs, code cleanup, and compiler warnings153 2.06 (2015-04-19) fix bug where PSD returns wrong '*comp' value
57 unmodified lines
211 isn't, let Sean know. Joseph Thomson212 Phil Jordan213 Nathan Reed214 Michaelangel007@github215 Nick Verigakis216217LICENSE218219This software is in the public domain. Where that dedication is not
1081 unmodified lines
1301 stbi__uint32 z = stbi__get16be(s);1302 return (z << 16) + stbi__get16be(s);1303}13041303#if defined (STBI_NO_BMP) && (STBI_NO_TGA) && (STBI_NO_GIF)1305#if defined(STBI_NO_BMP) && defined(STBI_NO_TGA) && defined(STBI_NO_GIF)1306// nothing1307#else1308static int stbi__get16le(stbi__context *s)1309{1310 int z = stbi__get8(s);
3905 unmodified lines
5216 for (channel = 0; channel < 4; channel++) {5217 stbi_uc *p;52185219 p = out + channel;5217 if (channel > channelCount) {5220 if (channel >= channelCount) {5221 // Fill this channel with default data.5222 stbi_uc val = channel == 3 ? 255 : 0;5223 for (i = 0; i < pixelCount; i++, p += 4)5220 *p = channel == 3 ? 255 : 0;5224 *p = val;5225 } else {5226 // Read the data.5227 if (bitdepth == 16) {5228 for (i = 0; i < pixelCount; i++, p += 4)
1129 unmodified lines
6358#endif // STB_IMAGE_IMPLEMENTATION63596360/*6361 revision history:6362 2.08 (2015-09-13) fix to 2.07 cleanup, reading RGB PSD as RGBA6363 2.07 (2015-09-13) fix compiler warnings6364 partial animated GIF support6365 limited 16-bit PSD support6366 #ifdef unused functions
141 unmodified lines