I want to write an importer that can import from an image file format, similar how the built-in importer for PNG-files work (but obviously for a different format), but I can not figure out what type of resource to create or what file extension to use.
My first thought was to create an Image and set all the pixels to what I parse out from the file to be imported, then create an ImageTexture from that Image. But I can not see any way to write out the ImageTexture to file (or what extension it would have)?
Then I looked at what happens when a PNG is imported and I see that the generated file is a StreamTexture with stex extension. But if that is what other image file importers are also supposed to do, I can find very little documentation about what a StreamTexture is or how to create a stex file.
What is the correct way of doing this?