addImageAsync() callback HELP!

Any variables created even if global in the addImageAsync callback are not available to the main thread. How can I fix this?

Thanks
DML

I am sorry, I don’t catch your meaning.