load_image_asynch(3)
π
load_image_asynch(3) π
okay bestie, welcome to the Arcan Lua API page for load_image_asynch(3) β the async image-loading one. We're keeping every single detail, just making it hit different. β¨
β¨ NAME β¨
load_image_asynch β asynchronously load an image from a resource. That's the whole vibe: image loading, but not blocking your entire life, periodt.
πΈ SYNOPSIS πΈ
VID, fail:BADID
load_image_asynch( resource, callback )
It hands you back VID, fail:BADID and takes resource, callback. Slay.
π¦ DESCRIPTION π¦
This one sets up a brand-new video object container and attempts to load and decode an image from the specified resource. That's it. That's the whole thing. No cap. π
π NOTES π
- The new
VIDhas its opacity set to0, which means it will start out hidden. So don't panic if you can't see it immediately β it's giving stealth mode on purpose. π - The operation can be forced asynchronous by either doing an operation which requires a stable state for the current context (e.g.
push/pop_video_context) or by explicitly callingimage_pushasynch.
π₯ EXAMPLE π₯
Here's the example, copied exactly β yes, exactly, bestie:
function load_image_asynch0()
vid = load_image_asynch("test.png", function(source, tbl)
if (tbl.kind == "loaded") then
resize_image(source, tbl.width, tbl.height);
warning("image loaded0);
elseif (tbl.kind == "load_failed") then
warning("couldn't load:" .. tbl.resource .. "0);
end);
show_image(vid);
end
π MISUSE π
bestie, this section is literally called MISUSE. Don't do this:
function load_image_asynch0()
vid = load_image_asynch("test.png", load_image_asynch);
end
π MISUSE π
Yep, another one. Still don't:
function load_image_asynch1()
vid = load_image_asynch("test.png", -1);
end
π SEE ALSO: π
image_pushasynchload_image(3) β that's the exact string the page lists. Yes, one string, no space. I'm not touching it. iykyk. π
xoxo, this page is from image πΈ dated October 2026 πΈ and it's load_image_asynch(3) π stay async, bestie β¨
π¦ where this page comes from
- nixos 26.05: arcan 0.7.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms