create JS image object

Hi,

i guess it’s quite obvious but i haven’t found how to create and image object with a local file. In JS would be something like:

 var img = new Image();
 img.src = "whatever";

Image objects are not “strong typed” but simple objects with some expected fields. In fact, to create an “image” with a local file all you have to do is var image = { path:'valid/native/path/to/file.png' }

Images returned from the Fuse APIs contain more data than this for convenience but for the purposes of the internal functionality all that is used is the file path.

Please try this and report how well it worked for you: The APIs were never really designed to be used in this way so it’s kind of untrodden ground.