if you just want to go by the actual object width height it's just:
local aspect = image.width / image.height.tofloat();
if ( aspect > 1.0 )
{
//wide
} else
{
//tall
}
but are you concerned about the TEXTURE width height (i.e using preserve art)? If so, it's more complicated, because you have to first make sure that the texture width/height is known in a transition, then check the texture aspect. This is why I made the
preserve-art module, and if you are using that you should be able to just go by the width/height of your object.