Need help to solve if condition
Hi All,
I need to resize the images to thumbnail veiw the condition is width should not exceed 75 pixels and height should not exceed 50 pixels
app.preferences.rulerUnits = Units.PIXELS
var Wid = docRef.width;
var Hig = docRef.height;
if (Number(Wid) > 75)
{
docRef.resizeImage(75,null,);
}
else if(Number(Hig) >= 50)
{
docRef.resizeImage(null,50,);
}
This works fine, but if the images are width 85 and hieght 200 px
The result is (75,176). which is wrong.
Please help me to solve
regards,
Vinoth