Skip to content

Commit

Permalink
update ncnn, stb, fix grayscale decoding, fix #94
Browse files Browse the repository at this point in the history
  • Loading branch information
nihui committed Jul 29, 2020
1 parent a0e5087 commit 57a709e
Show file tree
Hide file tree
Showing 4 changed files with 506 additions and 221 deletions.
2 changes: 2 additions & 0 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -250,12 +250,14 @@ void* load(void* args)
// grayscale -> rgb
stbi_image_free(pixeldata);
pixeldata = stbi_load_from_memory(filedata, length, &w, &h, &c, 3);
c = 3;
}
else if (c == 2)
{
// grayscale + alpha -> rgba
stbi_image_free(pixeldata);
pixeldata = stbi_load_from_memory(filedata, length, &w, &h, &c, 4);
c = 4;
}
}
#endif // _WIN32
Expand Down
2 changes: 1 addition & 1 deletion src/ncnn
Submodule ncnn updated 3 files
+1 −0 CONTRIBUTING.md
+1 −1 package.sh
+1 −1 src/gpu.cpp
Loading

0 comments on commit 57a709e

Please sign in to comment.