fix some typos, add image test program

pull/1/head
Sean Barrett 2014-05-27 21:38:43 -07:00
parent a31d50ab29
commit fc0bfd1b71
4 changed files with 16 additions and 4 deletions

View File

@ -3024,7 +3024,7 @@ static stbi_uc *bmp_load(stbi *s, int *x, int *y, int *comp, int req_comp)
mb = 0xffu << 0;
ma = 0xffu << 24;
fake_a = 1; // @TODO: check for cases like alpha value is all 0 and switch it to 255
STBI_UNUSED(fake_a);
STBI_NOTUSED(fake_a);
} else {
mr = 31u << 10;
mg = 31u << 5;
@ -3133,7 +3133,7 @@ static stbi_uc *bmp_load(stbi *s, int *x, int *y, int *comp, int req_comp)
}
} else {
for (i=0; i < (int) s->img_x; ++i) {
stbi__uint32 v = (stbi_uint32) (bpp == 16 ? get16le(s) : get32le(s));
stbi__uint32 v = (stbi__uint32) (bpp == 16 ? get16le(s) : get32le(s));
int a;
out[z++] = (stbi__uint8) shiftsigned(v & mr, rshift, rcount);
out[z++] = (stbi__uint8) shiftsigned(v & mg, gshift, gcount);

View File

@ -66,7 +66,7 @@ LINK32=link.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
# ADD CPP /nologo /MTd /W3 /GX /Zd /Od /I ".." /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "MAIN_TEST" /FR /FD /GZ /c
# ADD CPP /nologo /MTd /W3 /GX /Zd /Od /I "..\.." /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "MAIN_TEST" /FR /FD /GZ /c
# SUBTRACT CPP /YX
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"

View File

@ -3,6 +3,18 @@ Microsoft Developer Studio Workspace File, Format Version 6.00
###############################################################################
Project: "image_test"=.\image_test\image_test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Project: "stb"=.\stb.dsp - Package Owner=<4>
Package=<5>

View File

@ -65,7 +65,7 @@ LINK32=link.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
# ADD CPP /nologo /MTd /W3 /GX /Zd /Od /I ".." /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
# ADD CPP /nologo /MTd /W3 /GX /Zd /Od /I "..\.." /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe