This a simple code linked to a Cube:
import bge own = bge.logic.getCurrentController().owner matID = bge.texture.materialID(own, "IMmat") imagePath_A = bge.logic.expandPath('//plain.png') image_A = bge.texture.ImageFFmpeg(imagePath_A) print(image_A.size, image_A.valid) print(image_A.image) print(image_A.size, image_A.valid)
As you can see, there’re 3 prints. The first one, trys to print image_A size and its validity. It prints:
Then, Blender prints its data, it prints a bytearray. Then, it prints its size and validity… and now, it is:
Why, at the first time, after loading the file, it is invalid… and, after printing its data, it is valid and the size is correct?
I want to understand this, because, when playing with ImageMix, it tells me that the size is incorrect… for Blender, at that time, it is (0,0), not (64,128). I don’t know how to make it valid (and to have the correct size) to use with ImageMIix.