AlloSphere-Research-Group / allolib

Library for interactive multimedia application development
BSD 3-Clause "New" or "Revised" License
36 stars 15 forks source link

Image class only loads PNG files #38

Closed sihwapark closed 4 years ago

sihwapark commented 4 years ago

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 commented 4 years ago

This issue is on the devel branch code.

It is this commit that changed the code: https://github.com/AlloSphere-Research-Group/allolib/commit/8a9ece255aa102b871bb9ae3e5756984b02c2775

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 commented 4 years ago

No good reason :) Reverted c343e3dbbce6575138b4b916f8105f54aaae9408