MCPcopy Create free account
hub / github.com/BZFlag-Dev/bzflag / ReadImageData

Method ReadImageData

src/lua/LuaCallOuts.cpp:1022–1034  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1020
1021
1022int LuaCallOuts::ReadImageData(lua_State* L) {
1023 size_t inLen;
1024 const char* inData = luaL_checklstring(L, 1, &inLen);
1025 const bool infoOnly = lua_isboolean(L, 2) && lua_tobool(L, 2);
1026
1027 std::istringstream iss(std::string(inData, inLen));
1028 PNGImageFile image(&iss);
1029
1030 if (infoOnly) {
1031 return PushImageInfo(L, image);
1032 }
1033 return PushImageData(L, image);
1034}
1035
1036
1037int LuaCallOuts::ReadImageFile(lua_State* L) {

Callers

nothing calls this directly

Calls 4

lua_toboolFunction · 0.85
PushImageInfoFunction · 0.85
PushImageDataFunction · 0.85
luaL_checklstringFunction · 0.50

Tested by

no test coverage detected