diff options
| author | raysan5 <[email protected]> | 2017-04-16 14:06:04 +0200 |
|---|---|---|
| committer | raysan5 <[email protected]> | 2017-04-16 14:06:04 +0200 |
| commit | c67cffea38637f20dc733fec1986111b69a11119 (patch) | |
| tree | 08f6766a71d2af02677461e992d55898e721061e /src/textures.c | |
| parent | f5894278b74df34d7850438c36f9d7202ea08091 (diff) | |
| download | raylib-c67cffea38637f20dc733fec1986111b69a11119.tar.gz raylib-c67cffea38637f20dc733fec1986111b69a11119.zip | |
Updated STB libs to latest version
Diffstat (limited to 'src/textures.c')
| -rw-r--r-- | src/textures.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/textures.c b/src/textures.c index 8e3a1ee1..9fd5944e 100644 --- a/src/textures.c +++ b/src/textures.c @@ -195,9 +195,13 @@ Image LoadImage(const char *fileName) int imgWidth = 0; int imgHeight = 0; int imgBpp = 0; + + FILE *imFile = fopen(fileName, "rb"); // NOTE: Using stb_image to load images (Supports: BMP, TGA, PNG, JPG, ...) - image.data = stbi_load(fileName, &imgWidth, &imgHeight, &imgBpp, 0); + image.data = stbi_load_from_file(imFile, &imgWidth, &imgHeight, &imgBpp, 0); + + fclose(imFile); image.width = imgWidth; image.height = imgHeight; |
