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():