I think this is what you're trying to do
app.preferences.rulerUnits = Units.PIXELS; var doc = activeDocument; var Orientation = parseFloat(doc.height / doc.width); if (Orientation >= 1) { var wFactorP = parseFloat(7016 / doc.width); var hFactorP = parseFloat(9933 / doc.height); if (wFactorP > hFactorP) { doc.resizeImage(7016, undefined, undefined, ResampleMethod.BICUBIC); } else { doc.resizeImage(undefined, 9933, undefined, ResampleMethod.BICUBIC) } } else if (Orientation < 1) { var wFactorL = parseFloat(9933 / doc.width) var hFactorL = parseFloat(7016 / doc.height); if (wFactorL > hFactorL) { doc.resizeImage(9933, undefined, undefined, ResampleMethod.BICUBIC) } else { doc.resizeImage(undefined, 7016, undefined, ResampleMethod.BICUBIC) } }
Yes that's exactly it, thank you!
@±ln(x) started
London Fixed Gear and Single-Speed is a community of predominantly fixed gear and single-speed cyclists in and around London, UK.
This site is supported almost exclusively by donations. Please consider donating a small amount regularly.
I think this is what you're trying to do