Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image class only loads PNG files #38

Closed
sihwapark opened this issue May 22, 2020 · 2 comments
Closed

Image class only loads PNG files #38

sihwapark opened this issue May 22, 2020 · 2 comments

Comments

@sihwapark
Copy link
Member

sihwapark commented May 22, 2020

It seems the directives in al_stb_image.cpp has changed to only accept PNG files.

#define STB_IMAGE_IMPLEMENTATION
#define STBI_ONLY_PNG
#include "stb_image.h"

I had to add #define STBI_ONLY_JPEG to enable the Image class to also load jpeg files.

I am wondering whether this change is intended or not.

@younkhg
Copy link
Contributor

younkhg commented May 22, 2020

This issue is on the devel branch code.

It is this commit that changed the code: 8a9ece2

It used to have a black list instead of current white list.
#define STBI_NO_TGA
#define STBI_ONLY_PNG
#define STBI_NO_PSD
#define STBI_NO_HDR
#define STBI_NO_PIC
#define STBI_NO_GIF
#define STBI_NO_PNM

I also am curious about the reason of change.

@mantaraya36
Copy link
Contributor

No good reason :) Reverted c343e3d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants