GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
load_image_asynch(3) Arcan Lua API load_image_asynch(3)

load_image_asynch - asynchronously load an image from a resource

VID, fail:BADID
load_image_asynch( resource, callback )

Sets up a new video object container and attempts to load and decode an image from the specified resource.

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 operation which requires a stable state for the current context (e.g. push/pop_video_context) or by explicitly calling image_pushasynch.

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

function load_image_asynch0()
      vid = load_image_asynch("test.png", load_image_asynch);
end

function load_image_asynch1()
      vid = load_image_asynch("test.png", -1);
end

image_pushasynchload_image(3)

June 2022 image

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.