Question
Get image dimensions as float?
This is a bit backward:
var imageHeight = app.activeDocument.height.value;
if (imageHeight == 224)
{
// do stuff
}Didn't work for once - I assumed that image dimensions were ints, but there we go...
Casting it to an int worked:
if (parseInt(imageHeight) == 224)
{
// do stuff
}
Case closed.
But! Just out on curiousity, how do you get the float value of app.activeDocument.height??? - it always seems to report it as in int. Assuming that's what's going wrong.
I tried casting it as float and multiplying it by 1,000,000.
