When a ImageFFmpeg is valid...?

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:

(0,0) False

Then, Blender prints its data, it prints a bytearray. Then, it prints its size and validity… and now, it is:

(64,128) True

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.

Same problem here.

quick check:

I can just tell that it returns True if self->m_image.isImageAvailable() is True too. [ImageBase.cpp]

I can’t tell what self->m_image is.

I think it’s some kind of bug… reported here: https://developer.blender.org/T42842

EDIT: Benoit says:

Creating the ImageFFmpeg object opens the file but does not load the image buffer. For this you need to access directly the image property as you did in your test, or set the object as the source of a Texture object and refresh it. It’s only when the image buffer is accessed, either directly or indirectly, that the size of the image is computed.

So, I’ll go on testing…

Benoit said:

Creating the ImageFFmpeg object opens the file but does not load the image buffer. For this you need to access directly the image property as you did in your test, or set the object as the source of a Texture object and refresh it. It’s only when the image buffer is accessed, either directly or indirectly, that the size of the image is computed.

So, it is not a bug.