I'm making a level editor for my game and I import .BMP files at runtime to active objects.
I have this working fine and have all my tiles and animations importing perfectly.
The question I have is can you check what size of image you are importing or keep the active a constant size, like 32 x 32.
Ideally I'd want to be able to scale the .BMP to 32x32 or whatever the size the active is when I import it.
The reason being, I plan to let others use this editor and edit the BMP files to have their own graphics.
The trouble is, you can make the .BMP any size.
100 x 100 for example and when you import, your active is now a massive 100 x 100.
Not a deal breaker, I can just tell people to respect the graphics size or face issues but I'm very curious from a coding stand point, can this be done?
Can I make sure A, you can't import the wrong size sprite or B, ensure it's scaled to fit the active object?