in afdition i use this before i place the image to downscale them whether they are portrait or horizontal. // get a reference to the current (active) document and store it in a variable named "doc" doc = app.activeDocument; // change the color mode to RGB. Important for resizing GIFs with indexed colors, to get better results //doc.changeMode(ChangeMode.sRGB IEC61966-2.1); doc.convertProfile("sRGB IEC61966-2.1" , Intent.RELATIVECOLORIMETRIC) // these are our values for the END RESULT width and height (in pixels) of our image var fWidth = 2400; var fHeight = 2000; // do the resizing. if height > width (portrait-mode) resize based on height. otherwise, resize based on width if (doc.width > doc.height) { // doc.resizeImage(null,UnitValue(fWidth,"px")); doc.resizeImage(fWidth, null, 72, ResampleMethod.BICUBICSHARPER) } else { // doc.resizeImage(UnitValue(fWidth,"px"),null,null,ResampleMethod.BICUBIC); doc.resizeImage(null, fHeight, 72, ResampleMethod.BICUBICSHARPER) } Hope it helps you or others
... View more