- Joined
- Jan 11, 2014
- Messages
- 624
- Reaction score
- 159
- First Language
- English
- Primarily Uses
- RMMZ
I am trying to retrieve the value of the width/height of a picture that I import with ImageManager.loadBitmap. When I try the following code in the game console, it works just fine:
ImageManager.loadBitmap("img/pictures/puzzle/", "Castle").width;
However, once I try to set the exact same code to a variable within my plugin, I always get 0. This happens even if I set the image without the ".width" portion to a variable, then do variable.width.
What am I doing wrong? I cannot find any other way to retrieve the width of an image I wish to import.
Thanks!
ImageManager.loadBitmap("img/pictures/puzzle/", "Castle").width;
However, once I try to set the exact same code to a variable within my plugin, I always get 0. This happens even if I set the image without the ".width" portion to a variable, then do variable.width.
What am I doing wrong? I cannot find any other way to retrieve the width of an image I wish to import.
Thanks!

