Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
function ResizeInPS(myPath, myHorScale, myVerScale, myResolution, myResampleMethod) {
var bt = new BridgeTalk;
bt.target = "photoshop";
var myScript = 'try {\n';
myScript += 'var myPsDoc = app.open(File(\"' + myPath + '\"));\n';
myScript += 'app.preferences.rulerUnits = Units.PERCENT; \n' ;
myScript += 'myPsDoc.resizeImage(' + myHorScale +', ' + myVerScale + ', ' + myResolution + ', ' + myResampleMethod + '); \n' ;
myScript += 'myPsDoc.close(SaveOptions.SAVECHANGES);\n';
myScript += '}\n';
myScript += 'catch (myError) {\n';
myScript += 'myPsError += \"myError' + myPath + '\";\n';
myScript += '}';
bt.body = myScript;
bt.send();
}
Copy link to clipboard
Copied
Copy link to clipboard
Copied
// resizeInPS.jsx
//DESCRIPTION: Resizes every link in PhotoShop
var theScale = 90; // scaling factor in %
var theResolution = 300;
var theResampleMethod = 'ResampleMethod.BICUBIC';
var myLinks = app.activeDocument.links;
for ( i = 0; i < myLinks.length; i++ )
{
ResizeInPS( myLinks.filePath, theScale, theScale, theResolution, theResampleMethod );
myLinks.update();
myLinks.parent.fit( FitOptions.FRAME_TO_CONTENT );
}
function ResizeInPS(myPath, myHorScale, myVerScale, myResolution, myResampleMethod) {
var bt = new BridgeTalk;
bt.target = "photoshop";
var myScript = 'try {\n';
myScript += 'var myPsDoc = app.open(File(\"' + myPath + '\"));\n';
myScript += 'app.preferences.rulerUnits = Units.PERCENT; \n' ;
myScript += 'myPsDoc.resizeImage(' + myHorScale +', ' + myVerScale + ', ' + myResolution + ', ' + myResampleMethod + '); \n' ;
myScript += 'myPsDoc.close(SaveOptions.SAVECHANGES);\n';
myScript += '}\n';
myScript += 'catch (myError) {\n';
myScript += 'myPsError += \"myError' + myPath + '\";\n';
myScript += '}';
bt.body = myScript;
bt.send();
}
Copy link to clipboard
Copied
Copy link to clipboard
Copied
// resizeInPS04.jsx
//DESCRIPTION: Resizes every link in PhotoShop
var theScale = 150; // scaling factor in %
var theResolution = 72;
var theResampleMethod = 'ResampleMethod.BICUBIC';
var myChoice = confirm ('Warnung! \rBei Ausfühurng dieses Skriptes werden unwiderruflich alle verknüpften Bild-Dateien verändert. Machen Sie vorher Backups der Dateien.' );
if (myChoice == false)
exit();
var myLinks = app.activeDocument.links;
for ( var i = myLinks.length-1; i >= 0; i-- )
ResizeInPS( myLinks.filePath, theScale, theScale, theResolution, theResampleMethod );
while (myLinks[0].status == LinkStatus.NORMAL )
{
// think about the weather
}
myLinks.everyItem().update();
for ( var x = myLinks.length-1; x >= 0; x-- )
myLinks.parent.fit( FitOptions.FRAME_TO_CONTENT );
function ResizeInPS(myPath, myHorScale, myVerScale, myResolution, myResampleMethod) {
var bt = new BridgeTalk;
bt.target = "photoshop";
var myScript = 'try {\n';
myScript += 'var myPsDoc = app.open(File(\"' + myPath + '\"));\n';
myScript += 'app.preferences.rulerUnits = Units.PERCENT; \n' ;
myScript += 'myPsDoc.resizeImage(' + myHorScale +', ' + myVerScale + ', ' + myResolution + ', ' + myResampleMethod + '); \n' ;
myScript += 'myPsDoc.close(SaveOptions.SAVECHANGES);\n';
myScript += '}\n';
myScript += 'catch (myError) {\n';
myScript += 'myPsError += \"myError' + myPath + '\";\n';
myScript += '}';
bt.body = myScript;
bt.send();
}
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Find more inspiration, events, and resources on the new Adobe Community
Explore Now