Copy link to clipboard
Copied
Copy link to clipboard
Copied
if(app.documents.length == 2){
var startRulerUnits = app.preferences.rulerUnits;
app.preferences.rulerUnits = Units.PIXELS;
activeDocument = app.documents[0];
var Width = activeDocument.width.value;
var Height = activeDocument.height.value;
activeDocument = app.documents[1];
resize(Width,Height);
app.preferences.rulerUnits = startRulerUnits;
}
function resize(Width,Height) {
var ad = new ActionDescriptor();
ad.putUnitDouble( app.charIDToTypeID('Wdth'), app.charIDToTypeID('#Pxl'), Width );
ad.putUnitDouble( app.charIDToTypeID('Hght'), app.charIDToTypeID('#Pxl'), Height );
ad.putEnumerated( app.charIDToTypeID('Intr'), app.charIDToTypeID('Intp'), app.stringIDToTypeID('bicubicSharper') );
executeAction( app.charIDToTypeID('ImgS'), ad, DialogModes.NO );
};
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied