there is no property or function for loading texture data from file to a Clutter.Image
instance.
you should use GdkPixbuf
to load the image data from file, buffer, or stream, and then put it in a Clutter.Image
with something like:
const Clutter = imports.gi.Clutter;
const Cogl = imports.gi.Cogl;
const GdkPixbuf = imports.gi.GdkPixbuf;
const pixbuf = GdkPixbuf.Pixbuf.new_from_file('...');
const image = new Clutter.Image();
image.set_data(pixbuf.get_pixels(),
pixbuf.get_has_alpha() ? Cogl.PixelFormat.RGBA_8888
: Cogl.PixelFormat.RGB_888,
pixbuf.get_width(),
pixbuf.get_height(),
pixbuf.get_rowstride());
which should work; if it doesn't, then it's an introspection issue, and will likely need some tweaks in GdkPixbuf
.