set(layer[map].onloaded, showlog();trace(layer[map].imagewidth));
Thanks!
I completely missed the .onloaded method. I just put the code that deals with image dimensions to be run in an .onloaded and it's working fine!
I didn't expect to have to deal with such asynchronous behaviour with Krpano.