I am trying to create an image programmatically in C#. I create an Godot array of images:
Godot.Collections.Array<Image> images = new Godot.Collections.Array<Image>();

I instantiate the Godot Cubemap object
Cubemap CMtex = new Cubemap();

Then an populate the array with the 6 faces of the cube map (sideCtr = 0 to 5)
images[sideCtr] = oneSide;

Then I assign the image array to CMtex
CMtex.CreateFromImages(images);

But this is not working. The cube map .tres file gets created in the filesystem but there appears to be no pixel data and the size of the image is incorrect.

Any ideas?

    a month later

    dmadau
    maybe that you have to resize the array after "Godot.Collections.Array<Image> images = new Godot.Collections.Array<Image>();" to a size with images.Resize() ?

    dmadau - PS or use the collections.array like a list and add with .Add() instead of direct to index ??

    Thanks for the reply. I have a different question.

    I created the KTX importer which loads textures into Godot. If I load an ETC2 compressed texture, the preview window is not able to display it. I understand that Godot does not have an ETC2 decoder (only an encoder). This is a loaded question but do you have any recommendation for how to implement an ETC2 decoder in the Godot Engine? What is the original source for the ETC2 encoder that is used in Godot? Can this be expanded to decode and then convert the image to a png so that Godot preview can show it?