load_image(3)
π load_image(3) β Arcan Lua API π
okay bestie, welcome to load_image(3), the Arcan Lua API page that's about to make synchronous image loading your whole personality. it's giving "just get the picture on screen already" and honestly? iconic.
β¨ NAME β¨
load_image β synchronously load supported images. yes, synchronously. we'll get to what that means for your vibes in a sec π«Ά
πΈ SYNOPSIS πΈ
VID, fail:BADID
load_image( resource, startzv, desired width, desired height )
so you hand it a resource, a startzv, a desired width and a desired height, and it hands you back a VID β or it flops and you get fail:BADID. no cap, that's the whole deal π
π¦ DESCRIPTION π¦
this routine sets up a brand new video object container and then attempts to load and decode an image from the resource you specified. key word: attempts. it's out here trying its best, and if the resource says no, you get fail:BADID in your life π
π§ NOTES π§
- the new
VIDhas its opacity set to0β so it's hidden by default. it exists, it's just shy π - this routine is synchronous, so it will block until the image has been loaded. like, fully stops and waits. no multitasking, no side quests, just vibes and decoding β³
desired width/desired heightare capped to the engine compile-time valuesCONST_MAX_SURFACEWandCONST_MAX_SURFACEH(2048x2048). so dream big, but 2048x2048 is the ceiling, periodt π- if the engine is running in conservative mode, no local copy will be kept in memory and the resource will be reloaded on every operation that manipulates the current rendering context (e.g. stack push / pop or
launch_target(external)). lowkey high maintenance, but that's the tradeoff π« - supported file formats vary with platform and engine build β the only ones guaranteed to work are
PNGandJPEG. anything else is a gamble, and ngl we don't gamble with guarantees π°
π₯ EXAMPLE π₯
function load_image0()
vid = load_image("test.png");
show_image(vid);
vid2 = load_image("test.png", 2, 48, 48);
show_image(vid);
end
look at her go π first one loads test.png with defaults, shows it. then vid2 loads the same test.png with startzv of 2 and 48x48 dimensions β and then the example calls show_image(vid) again. yes, vid. we're showing you exactly what's written, bestie, no fixing β¨
π MISUSE π
function load_image0()
vid = load_image();
end
called it with zero arguments. no resource. that's not a vibe check, that's a vibe fail π«
function load_image1()
vid = load_image("test.png", -1, -1, -1);
end
negative startzv, negative width, negative height. like... why are we doing this. don't do this π
π SEE ALSO π
load_image_asynch(3)β the chill, non-blocking cousin. go say hi π
and that's the whole page, bestie π this little gem lives in the image manual, October 2026 edition, straight out of the Arcan Lua API β go load some pixels, synchronously, and slay βππ
π¦ 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