FreeBSD Manual Pages
load_image_asynch(3) Arcan Lua API load_image_asynch(3) NAME load_image_asynch - asynchronously load an image from a resource SYNOPSIS VID, fail:BADID load_image_asynch( resource, callback ) DESCRIPTION Sets up a new video object container and attempts to load and decode an image from the specified resource. NOTES 1 The new VID has its opacity set to 0, meaning that it will start out hidden. 2 The operation can be forced asynchronous by either doing an op- eration which requires a stable state for the current context (e.g. push/pop_video_context) or by explicitly calling im- age_pushasynch. EXAMPLE 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 function load_image_asynch0() vid = load_image_asynch("test.png", load_image_asynch); end MISUSE function load_image_asynch1() vid = load_image_asynch("test.png", -1); end SEE ALSO: image_pushasynchload_image(3) image April 2025 load_image_asynch(3)
NAME | SYNOPSIS | DESCRIPTION | NOTES | EXAMPLE | MISUSE | MISUSE | SEE ALSO:
Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=load_image_asynch&sektion=3&manpath=FreeBSD+Ports+14.3.quarterly>