문제

I am loading a Gdk.Pixbuf from bytes:

_pixbuf = new Gdk.Pixbuf(bytes);

Then, I'd like to read the _pixbuf data. But, it appears that the data is actually loading in the background because the data doesn't exist for a while. If I wait, all is fine.

How can I either know when it is finished, or force the update?

도움이 되었습니까?

해결책

It turns out that this code was fine... I was executing it in the graphics thread, and returning before it was done. Once I executed it so that it blocked until it was complete, then all was fine.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top