Just as a final follow-up: Using appex.get_attachments and Image.named works perfectly. Here my workflow:
I get the image file names via appex.get_attachments.
I weed out the paths for heic files which have a accompaning other image file.
Finally I load the remaining images manually via the Image.named method.
My current approach is to load the tileset.png which contains all the tiles. I then use Image.crop() for every tile I want to extract. I then upscale them using Image.resize() by some arbitrary factor, because if I would let the scene upscale the 8x8 textures to something like 64x64, the performance drops hard. Using BytesIO I convert them to ui.Image without saving them on disk and from there I can load them as a scene.Texture.
But thank you for the hint that I can load the image and scale them in one operation!
All I had to do to fix the original problem was converting the tileset.png to RGB mode.
I see what your saying but what you cannot see is originally (and before i fixed the duplicate streams) i had somthing similar to this:
img = Image.open('my_image.png')
img_rs = img.resize((256, 256), 1)
with io.BytesIO() as iodata:
i changed it to img=img... to reduce code knowing ill never need that exact ref to original again during this loop session.reason is i place the Texture object in a cache dict and from here on is called from there 🤓🤓
I also forgot to include my finally block that handles any mishaps once caching is complete..
for x in locals():
@Cethric made a full GLKit wrapper, which might do what you want.
In scene, you will be limited to converting each frame to .jpg by using the SceneView screen capture method, i think, since there is no way to get data out of a shader.
@abcabc , you should take a look at this module for guestures if you have not seen it Github. @JonB pointed me to this one. I have just started to try it. It's nice. Very easy to get up,and running. Especially for a long press. Is simple. Pinch is also easy, but I can see the more you have your head around the Transforms then do anything. Anyway, if you haven't seen, I think this would be right up your alley