3 ## ResourceImage (extends Image)
5 A resource image extends the basic {{#crossLink "image"}}Image class{{/crossLink}} with
6 the ability to load an image from a file.
8 ResourceImage supports two types of load policies
10 - dali.IMAGE_LOAD_POLICY_IMMEDIATE // load image once it is created (default)
11 - dali.IMAGE_LOAD_POLICY_ON_DEMAND // delay loading until the image is being used (a related actor is added to Stage)
16 var image = new dali.ResourceImage( { url:"my_image.png" } );
18 var imageActor = new dali.ImageActor( image );
24 function imageLoaded( image )
26 log("image loaded " +image.url + "\n");
31 loadPolicy:dali.IMAGE_LOAD_POLICY_IMMEDIATE,
32 releasePolicy: dali.IMAGE_RELEASE_POLICY_UNUSED
34 var image = new dali.ResourceImage( options );
36 image.connect("imageLoadingFinished", finished );
38 var imageActor = new dali.ImageActor( image );