Photoshop Panorama Photomerge Automatisierung mit Adobe ExtendScript Toolkit CS6

shortrange

Banned
Registriert
Okt. 2013
Beiträge
626
Hallo,

ich habe einige Fotos aufgenommen, die ich nun zu mehreren Panoramen in Adobe Photoshop CS6 verarbeiten möchte. Dies soll mit Hilfe eines automatisierten Skriptes funktionieren (siehe unten).

Das Skript funktioniert soweit, nur eine Sache bekomme ich nicht hin:
Es sollen zwei Versionen des Panoramas erstellt werden, eine mit Korrektur der Vignettierung, eine ohne ("lens-ja-vignette-ja" und "lens-ja-vignette-nein").

Lasse ich den Code, so wie er unten steht, ausführen, entsteht immer nur eine Version.
Woran liegt das? Wie kann ich den Code so korrigieren, dass zwei Versionen entstehen?

Code:
var runphotomergeFromScript = true; // must be before Photomerge include
//@includepath "/Applications/Adobe Photoshop CS6/Presets/Scripts/"
//@includepath "/c/Program Files (x86)/Adobe/Adobe Photoshop CS6/Presets/Scripts/"
//@includepath "/c/Program Files/Adobe/Adobe Photoshop CS6/Presets/Scripts/"
//@include "Photomerge.jsx"
//@show include

var psdOpts = new PhotoshopSaveOptions();
psdOpts.embedColorProfile = true;
psdOpts.alphaChannels = true;
psdOpts.layers = true;

var jpegOptions = new JPEGSaveOptions();
jpegOptions.quality=12;
jpegOptions.FormatOptions=FormatOptions.STANDARDBASELINE;

var workFolder = Folder.selectDialog();
parseFolder(workFolder);

function parseFolder(folder) {
    var folders = folder.getFiles( function( file ) { return file instanceof Folder; } );
    var jpg= folder.getFiles("*.jpg");
    var dng= folder.getFiles("*.dng");
    var cr2= folder.getFiles("*.CR2");
    var nef= folder.getFiles("*.NEF");
    var psd= folder.getFiles("*.psd");
    var files=jpg.concat(dng, cr2, nef, psd);
    for(var i = 0; i < folders.length; i++ ) {
        try {
            parseFolder(folders[i]);
        } catch(err) {
        }
    }
    if (files.length>0) {
        try {
            mergeImages(files);
        } catch (err) {
            alert(err);
        }
    }
}

function mergeImages(fList) {
    var alignmentKeys=Array("Auto"); // for more copy and paste following after Auto: ,"Prsp","cylindrical","spherical","sceneCollage","translation"
    for (var j=0; j< alignmentKeys.length; j++) {
        // override Photomerge.jsx settings. Default is "Auto". Uncomment to override the default.
        photomerge.alignmentKey=alignmentKeys[j];
        photomerge.alignmentKey   = "Auto";
        //photomerge.alignmentKey   = "Prsp";
        //photomerge.alignmentKey   = "cylindrical";
        //photomerge.alignmentKey   = "spherical";
        //photomerge.alignmentKey   = "sceneCollage";
        //photomerge.alignmentKey   = "translation"; // "Reposition" in layout dialog
        // other setting that may need to be changed. Defaults below
        photomerge.advancedBlending      = true; // 'Bend Images Together' checkbox in dialog
        photomerge.lensCorrection      = true; // Geometric Distortion Correction'checkbox in dialog
        photomerge.removeVignette      = true; // 'Vignette Removal' checkbox in dialog
        if( fList.length >  0) {
            photomerge.createPanorama(fList,false);
        }
        // The merged doc will be the activeDocument
        activeDocument.saveAs( new File( fList[0].parent +"_" + alignmentKeys[j] + "_" + "lens-ja-vignette-ja" + '.psd' ) , psdOpts,     true, Extension.LOWERCASE);
        activeDocument.saveAs( new File( fList[0].parent +"_" + alignmentKeys[j] + "_" + "lens-ja-vignette-ja" + '.jpg' ) , jpegOptions, true, Extension.LOWERCASE);
        activeDocument.close( SaveOptions.DONOTSAVECHANGES );
    }
}

function mergeImages(fList) {
    var alignmentKeys=Array("Auto"); // for more copy and paste following after Auto: ,"Prsp","cylindrical","spherical","sceneCollage","translation"
    for (var k=0; k< alignmentKeys.length; k++) {
        // override Photomerge.jsx settings. Default is "Auto". Uncomment to override the default.
        photomerge.alignmentKey=alignmentKeys[k];
        photomerge.alignmentKey   = "Auto";
        //photomerge.alignmentKey   = "Prsp";
        //photomerge.alignmentKey   = "cylindrical";
        //photomerge.alignmentKey   = "spherical";
        //photomerge.alignmentKey   = "sceneCollage";
        //photomerge.alignmentKey   = "translation"; // "Reposition" in layout dialog
        // other setting that may need to be changed. Defaults below
        photomerge.advancedBlending      = true; // 'Bend Images Together' checkbox in dialog
        photomerge.lensCorrection      = true; // Geometric Distortion Correction'checkbox in dialog
        photomerge.removeVignette      = false; // 'Vignette Removal' checkbox in dialog
        if( fList.length >  0) {
            photomerge.createPanorama(fList,false);
        }
        // The merged doc will be the activeDocument
        activeDocument.saveAs( new File( fList[0].parent +"_" + alignmentKeys[k] + "_" + "lens-ja-vignette-nein" + '.psd' ) , psdOpts,     true, Extension.LOWERCASE);
        activeDocument.saveAs( new File( fList[0].parent +"_" + alignmentKeys[k] + "_" + "lens-ja-vignette-nein" + '.jpg' ) , jpegOptions, true, Extension.LOWERCASE);
        activeDocument.close( SaveOptions.DONOTSAVECHANGES );
    }
}
 
Habe zwar noch nie Scripts in/für PS entwickelt und bin sonst mehr in Java unterwegs aber was mir auffällt und aufstößt ist, dass du zweimal den gleichen Function-Namen verwendest mit dem gleichen Parameter... das "kann" so nicht funktionieren bzw. würde niemals in Java klappen...
Anstatt zweimal den gleichen Namen zu verwenden musst du mindestens eine Function umbenennen und oben dort wo der Aufruf stattfindet einen weiteren Function-Aufruf ergänzen ala:

Code:
        try {
            mergeImages(files);
            mergeImages2(files);
        } catch (err) {
            alert(err);
        }

Grundsätzlich wäre es ggf. besser nur eine Function zu schreiben die beide Outputs liefern kann und dies über einen weiteren Parameter zu steuern...

Edit: Ist das denn selbst geschrieben oder irgendwo herkopiert?
 
AW: Photoshop Panorama Photomerge Automatisierung Automation Batch Adobe ExtendScript

Mir ist gerade eingefallen, dass das neue Skript bestimmt jemandem helfen könnte.
Hier der Code:

Code:
var runphotomergeFromScript = true; // must be before Photomerge include
//@includepath "/Applications/Adobe Photoshop CS6/Presets/Scripts/"
//@includepath "/c/Program Files (x86)/Adobe/Adobe Photoshop CS6/Presets/Scripts/"
//@includepath "/c/Program Files/Adobe/Adobe Photoshop CS6/Presets/Scripts/"
//@include "Photomerge.jsx"
//@show include

var psdOpts = new PhotoshopSaveOptions();
psdOpts.embedColorProfile = true;
psdOpts.alphaChannels = true;
psdOpts.layers = true;

var jpegOptions = new JPEGSaveOptions();
jpegOptions.quality=12;
jpegOptions.FormatOptions=FormatOptions.STANDARDBASELINE;

var workFolder = Folder.selectDialog();
parseFolder(workFolder);

function parseFolder(folder) {
    var folders = folder.getFiles( function( file ) { return file instanceof Folder; } );
    var jpg= folder.getFiles("*.jpg");
    var dng= folder.getFiles("*.dng");
    var cr2= folder.getFiles("*.CR2");
    var nef= folder.getFiles("*.NEF");
    var psd= folder.getFiles("*.psd");
    var files=jpg.concat(dng, cr2, nef, psd);
    for(var i = 0; i < folders.length; i++ ) {
        try {
            parseFolder(folders[i]);
        } catch(err) {
        }
    }
    if (files.length>0) {
        try {
            mergeImages1(files);
             mergeImages2(files);
             mergeImages3(files);
             mergeImages4(files);
             mergeImages5(files);
             mergeImages6(files);
             mergeImages7(files);
             mergeImages8(files);
             mergeImages9(files);
             mergeImages10(files);
             mergeImages11(files);
             mergeImages12(files);
        } catch (err) {
            alert(err);
        }
    }
}




function mergeImages1(fList) {
    var alignmentKeys=Array("Auto"); // for more copy and paste following after Auto: ,"Prsp","cylindrical","spherical","sceneCollage","translation"
    for (var j=0; j< alignmentKeys.length; j++) {
        // override Photomerge.jsx settings. Default is "Auto". Uncomment to override the default.
        photomerge.alignmentKey=alignmentKeys[j];
        photomerge.alignmentKey   = "Auto";
        //photomerge.alignmentKey   = "Prsp";
        //photomerge.alignmentKey   = "cylindrical";
        //photomerge.alignmentKey   = "spherical";
        //photomerge.alignmentKey   = "sceneCollage";
        //photomerge.alignmentKey   = "translation"; // "Reposition" in layout dialog
        // other setting that may need to be changed. Defaults below
        photomerge.advancedBlending      = true; // 'Bend Images Together' checkbox in dialog
        photomerge.lensCorrection      = true; // Geometric Distortion Correction'checkbox in dialog
        photomerge.removeVignette      = true; // 'Vignette Removal' checkbox in dialog
        if( fList.length >  0) {
            photomerge.createPanorama(fList,false);
        }
        // The merged doc will be the activeDocument
        activeDocument.saveAs( new File( fList[0].parent +"_" + alignmentKeys[j] + "_" + "lens-ja-vignette-ja_1" + '.psd' ) , psdOpts,     true, Extension.LOWERCASE);
        activeDocument.saveAs( new File( fList[0].parent +"_" + alignmentKeys[j] + "_" + "lens-ja-vignette-ja_1" + '.jpg' ) , jpegOptions, true, Extension.LOWERCASE);
        activeDocument.close( SaveOptions.DONOTSAVECHANGES );
    }
}

function mergeImages2(fList) {
    var alignmentKeys=Array("Auto"); // for more copy and paste following after Auto: ,"Prsp","cylindrical","spherical","sceneCollage","translation"
    for (var k=0; k< alignmentKeys.length; k++) {
        // override Photomerge.jsx settings. Default is "Auto". Uncomment to override the default.
        photomerge.alignmentKey=alignmentKeys[k];
        photomerge.alignmentKey   = "Auto";
        //photomerge.alignmentKey   = "Prsp";
        //photomerge.alignmentKey   = "cylindrical";
        //photomerge.alignmentKey   = "spherical";
        //photomerge.alignmentKey   = "sceneCollage";
        //photomerge.alignmentKey   = "translation"; // "Reposition" in layout dialog
        // other setting that may need to be changed. Defaults below
        photomerge.advancedBlending      = true; // 'Bend Images Together' checkbox in dialog
        photomerge.lensCorrection      = true; // Geometric Distortion Correction'checkbox in dialog
        photomerge.removeVignette      = true; // 'Vignette Removal' checkbox in dialog
        if( fList.length >  0) {
            photomerge.createPanorama(fList,false);
        }
        // The merged doc will be the activeDocument
        activeDocument.saveAs( new File( fList[0].parent +"_" + alignmentKeys[k] + "_" + "lens-ja-vignette-ja_2" + '.psd' ) , psdOpts,     true, Extension.LOWERCASE);
        activeDocument.saveAs( new File( fList[0].parent +"_" + alignmentKeys[k] + "_" + "lens-ja-vignette-ja_2" + '.jpg' ) , jpegOptions, true, Extension.LOWERCASE);
        activeDocument.close( SaveOptions.DONOTSAVECHANGES );
    }
}

function mergeImages3(fList) {
    var alignmentKeys=Array("Auto"); // for more copy and paste following after Auto: ,"Prsp","cylindrical","spherical","sceneCollage","translation"
    for (var j=0; j< alignmentKeys.length; j++) {
        // override Photomerge.jsx settings. Default is "Auto". Uncomment to override the default.
        photomerge.alignmentKey=alignmentKeys[j];
        photomerge.alignmentKey   = "Auto";
        //photomerge.alignmentKey   = "Prsp";
        //photomerge.alignmentKey   = "cylindrical";
        //photomerge.alignmentKey   = "spherical";
        //photomerge.alignmentKey   = "sceneCollage";
        //photomerge.alignmentKey   = "translation"; // "Reposition" in layout dialog
        // other setting that may need to be changed. Defaults below
        photomerge.advancedBlending      = true; // 'Bend Images Together' checkbox in dialog
        photomerge.lensCorrection      = true; // Geometric Distortion Correction'checkbox in dialog
        photomerge.removeVignette      = true; // 'Vignette Removal' checkbox in dialog
        if( fList.length >  0) {
            photomerge.createPanorama(fList,false);
        }
        // The merged doc will be the activeDocument
        activeDocument.saveAs( new File( fList[0].parent +"_" + alignmentKeys[j] + "_" + "lens-ja-vignette-ja_3" + '.psd' ) , psdOpts,     true, Extension.LOWERCASE);
        activeDocument.saveAs( new File( fList[0].parent +"_" + alignmentKeys[j] + "_" + "lens-ja-vignette-ja_3" + '.jpg' ) , jpegOptions, true, Extension.LOWERCASE);
        activeDocument.close( SaveOptions.DONOTSAVECHANGES );
    }
}





function mergeImages4(fList) {
    var alignmentKeys=Array("Auto"); // for more copy and paste following after Auto: ,"Prsp","cylindrical","spherical","sceneCollage","translation"
    for (var k=0; k< alignmentKeys.length; k++) {
        // override Photomerge.jsx settings. Default is "Auto". Uncomment to override the default.
        photomerge.alignmentKey=alignmentKeys[k];
        photomerge.alignmentKey   = "Auto";
        //photomerge.alignmentKey   = "Prsp";
        //photomerge.alignmentKey   = "cylindrical";
        //photomerge.alignmentKey   = "spherical";
        //photomerge.alignmentKey   = "sceneCollage";
        //photomerge.alignmentKey   = "translation"; // "Reposition" in layout dialog
        // other setting that may need to be changed. Defaults below
        photomerge.advancedBlending      = true; // 'Bend Images Together' checkbox in dialog
        photomerge.lensCorrection      = true; // Geometric Distortion Correction'checkbox in dialog
        photomerge.removeVignette      = false; // 'Vignette Removal' checkbox in dialog
        if( fList.length >  0) {
            photomerge.createPanorama(fList,false);
        }
        // The merged doc will be the activeDocument
        activeDocument.saveAs( new File( fList[0].parent +"_" + alignmentKeys[k] + "_" + "lens-ja-vignette-nein_4" + '.psd' ) , psdOpts,     true, Extension.LOWERCASE);
        activeDocument.saveAs( new File( fList[0].parent +"_" + alignmentKeys[k] + "_" + "lens-ja-vignette-nein_4" + '.jpg' ) , jpegOptions, true, Extension.LOWERCASE);
        activeDocument.close( SaveOptions.DONOTSAVECHANGES );
    }
}

function mergeImages5(fList) {
    var alignmentKeys=Array("Auto"); // for more copy and paste following after Auto: ,"Prsp","cylindrical","spherical","sceneCollage","translation"
    for (var j=0; j< alignmentKeys.length; j++) {
        // override Photomerge.jsx settings. Default is "Auto". Uncomment to override the default.
        photomerge.alignmentKey=alignmentKeys[j];
        photomerge.alignmentKey   = "Auto";
        //photomerge.alignmentKey   = "Prsp";
        //photomerge.alignmentKey   = "cylindrical";
        //photomerge.alignmentKey   = "spherical";
        //photomerge.alignmentKey   = "sceneCollage";
        //photomerge.alignmentKey   = "translation"; // "Reposition" in layout dialog
        // other setting that may need to be changed. Defaults below
        photomerge.advancedBlending      = true; // 'Bend Images Together' checkbox in dialog
        photomerge.lensCorrection      = true; // Geometric Distortion Correction'checkbox in dialog
        photomerge.removeVignette      = false; // 'Vignette Removal' checkbox in dialog
        if( fList.length >  0) {
            photomerge.createPanorama(fList,false);
        }
        // The merged doc will be the activeDocument
        activeDocument.saveAs( new File( fList[0].parent +"_" + alignmentKeys[j] + "_" + "lens-ja-vignette-nein_5" + '.psd' ) , psdOpts,     true, Extension.LOWERCASE);
        activeDocument.saveAs( new File( fList[0].parent +"_" + alignmentKeys[j] + "_" + "lens-ja-vignette-nein_5" + '.jpg' ) , jpegOptions, true, Extension.LOWERCASE);
        activeDocument.close( SaveOptions.DONOTSAVECHANGES );
    }
}

function mergeImages6(fList) {
    var alignmentKeys=Array("Auto"); // for more copy and paste following after Auto: ,"Prsp","cylindrical","spherical","sceneCollage","translation"
    for (var k=0; k< alignmentKeys.length; k++) {
        // override Photomerge.jsx settings. Default is "Auto". Uncomment to override the default.
        photomerge.alignmentKey=alignmentKeys[k];
        photomerge.alignmentKey   = "Auto";
        //photomerge.alignmentKey   = "Prsp";
        //photomerge.alignmentKey   = "cylindrical";
        //photomerge.alignmentKey   = "spherical";
        //photomerge.alignmentKey   = "sceneCollage";
        //photomerge.alignmentKey   = "translation"; // "Reposition" in layout dialog
        // other setting that may need to be changed. Defaults below
        photomerge.advancedBlending      = true; // 'Bend Images Together' checkbox in dialog
        photomerge.lensCorrection      = true; // Geometric Distortion Correction'checkbox in dialog
        photomerge.removeVignette      = false; // 'Vignette Removal' checkbox in dialog
        if( fList.length >  0) {
            photomerge.createPanorama(fList,false);
        }
        // The merged doc will be the activeDocument
        activeDocument.saveAs( new File( fList[0].parent +"_" + alignmentKeys[k] + "_" + "lens-ja-vignette-nein_6" + '.psd' ) , psdOpts,     true, Extension.LOWERCASE);
        activeDocument.saveAs( new File( fList[0].parent +"_" + alignmentKeys[k] + "_" + "lens-ja-vignette-nein_6" + '.jpg' ) , jpegOptions, true, Extension.LOWERCASE);
        activeDocument.close( SaveOptions.DONOTSAVECHANGES );
    }
}






function mergeImages7(fList) {
    var alignmentKeys=Array("Auto"); // for more copy and paste following after Auto: ,"Prsp","cylindrical","spherical","sceneCollage","translation"
    for (var j=0; j< alignmentKeys.length; j++) {
        // override Photomerge.jsx settings. Default is "Auto". Uncomment to override the default.
        photomerge.alignmentKey=alignmentKeys[j];
        photomerge.alignmentKey   = "Auto";
        //photomerge.alignmentKey   = "Prsp";
        //photomerge.alignmentKey   = "cylindrical";
        //photomerge.alignmentKey   = "spherical";
        //photomerge.alignmentKey   = "sceneCollage";
        //photomerge.alignmentKey   = "translation"; // "Reposition" in layout dialog
        // other setting that may need to be changed. Defaults below
        photomerge.advancedBlending      = true; // 'Bend Images Together' checkbox in dialog
        photomerge.lensCorrection      = false; // Geometric Distortion Correction'checkbox in dialog
        photomerge.removeVignette      = true; // 'Vignette Removal' checkbox in dialog
        if( fList.length >  0) {
            photomerge.createPanorama(fList,false);
        }
        // The merged doc will be the activeDocument
        activeDocument.saveAs( new File( fList[0].parent +"_" + alignmentKeys[j] + "_" + "lens-nein-vignette-ja_7" + '.psd' ) , psdOpts,     true, Extension.LOWERCASE);
        activeDocument.saveAs( new File( fList[0].parent +"_" + alignmentKeys[j] + "_" + "lens-nein-vignette-ja_7" + '.jpg' ) , jpegOptions, true, Extension.LOWERCASE);
        activeDocument.close( SaveOptions.DONOTSAVECHANGES );
    }
}

function mergeImages8(fList) {
    var alignmentKeys=Array("Auto"); // for more copy and paste following after Auto: ,"Prsp","cylindrical","spherical","sceneCollage","translation"
    for (var k=0; k< alignmentKeys.length; k++) {
        // override Photomerge.jsx settings. Default is "Auto". Uncomment to override the default.
        photomerge.alignmentKey=alignmentKeys[k];
        photomerge.alignmentKey   = "Auto";
        //photomerge.alignmentKey   = "Prsp";
        //photomerge.alignmentKey   = "cylindrical";
        //photomerge.alignmentKey   = "spherical";
        //photomerge.alignmentKey   = "sceneCollage";
        //photomerge.alignmentKey   = "translation"; // "Reposition" in layout dialog
        // other setting that may need to be changed. Defaults below
        photomerge.advancedBlending      = true; // 'Bend Images Together' checkbox in dialog
        photomerge.lensCorrection      = false; // Geometric Distortion Correction'checkbox in dialog
        photomerge.removeVignette      = true; // 'Vignette Removal' checkbox in dialog
        if( fList.length >  0) {
            photomerge.createPanorama(fList,false);
        }
        // The merged doc will be the activeDocument
        activeDocument.saveAs( new File( fList[0].parent +"_" + alignmentKeys[k] + "_" + "lens-nein-vignette-ja_8" + '.psd' ) , psdOpts,     true, Extension.LOWERCASE);
        activeDocument.saveAs( new File( fList[0].parent +"_" + alignmentKeys[k] + "_" + "lens-nein-vignette-ja_8" + '.jpg' ) , jpegOptions, true, Extension.LOWERCASE);
        activeDocument.close( SaveOptions.DONOTSAVECHANGES );
    }
}

function mergeImages9(fList) {
    var alignmentKeys=Array("Auto"); // for more copy and paste following after Auto: ,"Prsp","cylindrical","spherical","sceneCollage","translation"
    for (var j=0; j< alignmentKeys.length; j++) {
        // override Photomerge.jsx settings. Default is "Auto". Uncomment to override the default.
        photomerge.alignmentKey=alignmentKeys[j];
        photomerge.alignmentKey   = "Auto";
        //photomerge.alignmentKey   = "Prsp";
        //photomerge.alignmentKey   = "cylindrical";
        //photomerge.alignmentKey   = "spherical";
        //photomerge.alignmentKey   = "sceneCollage";
        //photomerge.alignmentKey   = "translation"; // "Reposition" in layout dialog
        // other setting that may need to be changed. Defaults below
        photomerge.advancedBlending      = true; // 'Bend Images Together' checkbox in dialog
        photomerge.lensCorrection      = false; // Geometric Distortion Correction'checkbox in dialog
        photomerge.removeVignette      = true; // 'Vignette Removal' checkbox in dialog
        if( fList.length >  0) {
            photomerge.createPanorama(fList,false);
        }
        // The merged doc will be the activeDocument
        activeDocument.saveAs( new File( fList[0].parent +"_" + alignmentKeys[j] + "_" + "lens-nein-vignette-ja_9" + '.psd' ) , psdOpts,     true, Extension.LOWERCASE);
        activeDocument.saveAs( new File( fList[0].parent +"_" + alignmentKeys[j] + "_" + "lens-nein-vignette-ja_9" + '.jpg' ) , jpegOptions, true, Extension.LOWERCASE);
        activeDocument.close( SaveOptions.DONOTSAVECHANGES );
    }
}






function mergeImages10(fList) {
    var alignmentKeys=Array("Auto"); // for more copy and paste following after Auto: ,"Prsp","cylindrical","spherical","sceneCollage","translation"
    for (var k=0; k< alignmentKeys.length; k++) {
        // override Photomerge.jsx settings. Default is "Auto". Uncomment to override the default.
        photomerge.alignmentKey=alignmentKeys[k];
        photomerge.alignmentKey   = "Auto";
        //photomerge.alignmentKey   = "Prsp";
        //photomerge.alignmentKey   = "cylindrical";
        //photomerge.alignmentKey   = "spherical";
        //photomerge.alignmentKey   = "sceneCollage";
        //photomerge.alignmentKey   = "translation"; // "Reposition" in layout dialog
        // other setting that may need to be changed. Defaults below
        photomerge.advancedBlending      = true; // 'Bend Images Together' checkbox in dialog
        photomerge.lensCorrection      = false; // Geometric Distortion Correction'checkbox in dialog
        photomerge.removeVignette      = false; // 'Vignette Removal' checkbox in dialog
        if( fList.length >  0) {
            photomerge.createPanorama(fList,false);
        }
        // The merged doc will be the activeDocument
        activeDocument.saveAs( new File( fList[0].parent +"_" + alignmentKeys[k] + "_" + "lens-nein-vignette-nein_10" + '.psd' ) , psdOpts,     true, Extension.LOWERCASE);
        activeDocument.saveAs( new File( fList[0].parent +"_" + alignmentKeys[k] + "_" + "lens-nein-vignette-nein_10" + '.jpg' ) , jpegOptions, true, Extension.LOWERCASE);
        activeDocument.close( SaveOptions.DONOTSAVECHANGES );
    }
}

function mergeImages11(fList) {
    var alignmentKeys=Array("Auto"); // for more copy and paste following after Auto: ,"Prsp","cylindrical","spherical","sceneCollage","translation"
    for (var j=0; j< alignmentKeys.length; j++) {
        // override Photomerge.jsx settings. Default is "Auto". Uncomment to override the default.
        photomerge.alignmentKey=alignmentKeys[j];
        photomerge.alignmentKey   = "Auto";
        //photomerge.alignmentKey   = "Prsp";
        //photomerge.alignmentKey   = "cylindrical";
        //photomerge.alignmentKey   = "spherical";
        //photomerge.alignmentKey   = "sceneCollage";
        //photomerge.alignmentKey   = "translation"; // "Reposition" in layout dialog
        // other setting that may need to be changed. Defaults below
        photomerge.advancedBlending      = true; // 'Bend Images Together' checkbox in dialog
        photomerge.lensCorrection      = false; // Geometric Distortion Correction'checkbox in dialog
        photomerge.removeVignette      = false; // 'Vignette Removal' checkbox in dialog
        if( fList.length >  0) {
            photomerge.createPanorama(fList,false);
        }
        // The merged doc will be the activeDocument
        activeDocument.saveAs( new File( fList[0].parent +"_" + alignmentKeys[j] + "_" + "lens-nein-vignette-nein_11" + '.psd' ) , psdOpts,     true, Extension.LOWERCASE);
        activeDocument.saveAs( new File( fList[0].parent +"_" + alignmentKeys[j] + "_" + "lens-nein-vignette-nein_11" + '.jpg' ) , jpegOptions, true, Extension.LOWERCASE);
        activeDocument.close( SaveOptions.DONOTSAVECHANGES );
    }
}

function mergeImages12(fList) {
    var alignmentKeys=Array("Auto"); // for more copy and paste following after Auto: ,"Prsp","cylindrical","spherical","sceneCollage","translation"
    for (var k=0; k< alignmentKeys.length; k++) {
        // override Photomerge.jsx settings. Default is "Auto". Uncomment to override the default.
        photomerge.alignmentKey=alignmentKeys[k];
        photomerge.alignmentKey   = "Auto";
        //photomerge.alignmentKey   = "Prsp";
        //photomerge.alignmentKey   = "cylindrical";
        //photomerge.alignmentKey   = "spherical";
        //photomerge.alignmentKey   = "sceneCollage";
        //photomerge.alignmentKey   = "translation"; // "Reposition" in layout dialog
        // other setting that may need to be changed. Defaults below
        photomerge.advancedBlending      = true; // 'Bend Images Together' checkbox in dialog
        photomerge.lensCorrection      = false; // Geometric Distortion Correction'checkbox in dialog
        photomerge.removeVignette      = false; // 'Vignette Removal' checkbox in dialog
        if( fList.length >  0) {
            photomerge.createPanorama(fList,false);
        }
        // The merged doc will be the activeDocument
        activeDocument.saveAs( new File( fList[0].parent +"_" + alignmentKeys[k] + "_" + "lens-nein-vignette-nein_12" + '.psd' ) , psdOpts,     true, Extension.LOWERCASE);
        activeDocument.saveAs( new File( fList[0].parent +"_" + alignmentKeys[k] + "_" + "lens-nein-vignette-nein_12" + '.jpg' ) , jpegOptions, true, Extension.LOWERCASE);
        activeDocument.close( SaveOptions.DONOTSAVECHANGES );
    }
}
 
Zurück
Oben