MCPcopy Create free account
hub / github.com/RobLoach/raylib-cpp / Load

Method Load

include/Image.hpp:218–223  ·  view source on GitHub ↗

* Load image from file into CPU memory (RAM) * * @throws raylib::RaylibException Thrown if the image failed to load from the file. * * @see ::LoadImage() */

Source from the content-addressed store, hash-verified

216 * @see ::LoadImage()
217 */
218 void Load(const std::string& fileName) {
219 set(::LoadImage(fileName.c_str()));
220 if (!IsValid()) {
221 throw RaylibException("Failed to load Image from file: " + fileName);
222 }
223 }
224
225 /**
226 * Load image from RAW file data.

Callers

nothing calls this directly

Calls 3

RaylibExceptionClass · 0.85
c_strMethod · 0.80
IsValidFunction · 0.70

Tested by

no test coverage detected