ID:1441427
 
Applies to:
Status: Open

Issue hasn't been assigned a status value.
There needs to be a better way of getting information from a .dmi file. At the moment you have the icon_states() function which no longer cuts it. Icons [as im sure you're aware] have many other variables such as framerate, the moving tag, total number of frames, etc that I think should be available to the user.

At the moment the only work around you have is Darkcampaigner's DMI Icon library and while it is a good, it's non-native quirkiness is limits its power. [You have to have the direct path to the icon, Have to have a world running in trusted & reliance on an external dll]

Scenario #1:
I want to flick an state, and when that state is finished, I want to flick another. Impossible without DarkCampainger's lib.

Scenario #2:
I want to transform a object who's bounding box is not the full size of the object. I can scale it correctly if I have access to the size of the image, unfortunately impossible at this moment.

Scenario #3:
I want to see if my icon_state has a moving state. If not set to a different icon_state. Currently impossible.

etc,etc.

You could make a new /dmi datum with a few basic variables and procs and that'll be unbelievably helpful and would make BYOND a much more powerful engine.
For the size thing you can do.

var/icon/I = icon('myfile.dmi')
src << "The image is [I.Width()]x[I.Height()]px"


But I do agree, it would be nice to have easier direct access to more information.