9 lines
289 B
Lua
9 lines
289 B
Lua
local load_image = function(file_path)
|
|
local file = io.open(file_path, "rb")
|
|
local raw_data = file:read("*all")
|
|
file:close()
|
|
local love_file_data = love.filesystem.newFileData(raw_data, file_path)
|
|
local love_image = love.graphics.newImage(love_file_data)
|
|
return love_image
|
|
end
|