Problems getting bitmap.width and bitmap.height

Hi people!
I was making a plugin that creates a bitmap on the screen.
But I'm having some problems getting the width and height of that.

I have a function that receives arguments that help put the bitmap in a predefined position on the screen through his width and height.
when I create the bitmap, it does not give me his width and height, in the function "setPosition"

JavaScript:
Sprite_PressStart.prototype.initialize = function() {
    Sprite_Base.prototype.initialize.call(this);
    this.createBitmap();
    this.setPositions();
};

Sprite_PressStart.prototype.createBitmap = function(){
    const image = ImageManager.loadSystem(Eli.PressStart.Param.image);
    this.bitmap = image;
    console.log(this.bitmap.width) // returns 0
    console.log(this.bitmap.height) // returns 0
   
};
   
Sprite_PressStart.prototype.setPositions = function(){
    const param = Eli.PressStart.Param;
    const position = Eli.Book.presetPos(this.bitmap.width, this.bitmap.height, param.customX, param.customY, param.preset);
    this.move(position.x, position.y);
};

Sprite_PressStart.prototype.update = function(){
    //this.setPositions(); If I put it here, everything works fine and I can get the sizes of the bitmap.
    // More code here...
};

But if I put the function "setPosition" to be called on the update, it will give me the width and height, but only after the first update. Because in the first, it will always give me 0 for both sizes.

This sprite is created in Scene_Title. Perhaps I should set the X and Y position on the function from the Scene_Title that I'm using to create the sprite?
Issue is related to async loading.
When you make a request to load an image, the game will go and load the file for you but it might not be ready when you access it.

You would either have to do some sort of callback when it's ready, or just rely on that update code to check if it's loaded or not.
@Tsukihime
Oh, thanks for that!
I have reserved the system image previously and now it works fine!
JavaScript:
ImageManager.reserveSystem

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/problems-getting-bitmap-width-and-bitmap-height.125363/