I can't see this mentioned in the documentation. Am I missing something obvious? Or does SFML really give you no option, forcing everything to be loaded as RGBA8888?
Searches on Google and the SFML forums have been unproductive.
I can't see this mentioned in the documentation. Am I missing something obvious? Or does SFML really give you no option, forcing everything to be loaded as RGBA8888?
Searches on Google and the SFML forums have been unproductive.
SFML, at least as of version 2 and as of this writing, uses stb_image
(available here) to load image data, except on Android platforms. You can verify this by checking the source (Image.cpp
and ImageLoader.cpp
in particular).
Most of the documentation for stb_image
is in the header file; SFML's particular version of it is here (be warned: it is large). However, while the header comments do point out some limitations for particular file formats, there's nothing in there that seems to imply RGBA8888
only (although for the PNG format, it sounds like you can only have 8-bit channels so RGBA4444
is probably out).
Thus, the short answer is: yes, but with some limitations depending on the file format.