🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.photoshop.scripting
Article #468

Re: Create strip from image sequence

#468
From: Paul_R
Date: Wed, 04 Feb 2009 18:57
86 lines
2526 bytes
Ben, I think I got it wrong, did you mean to create a strip bottom up?
If so this should do it.




 
 selectedFolder = Folder.selectDialog( "Please select input folder");  

 var fileList = selectedFolder.getFiles();  

 var strtRulerUnits = app.preferences.rulerUnits;   

var strtTypeUnits = app.preferences.typeUnits;   

app.preferences.rulerUnits = Units.PIXELS;   

app.preferences.typeUnits = TypeUnits.PIXELS;  

 for(var a = 0; a<fileList.length;a++){  

var file = fileList[a];  

if(file instanceof File && file.name.match(/\.(jpg|tif|gif|png)$/i)){  

 open(file);  

var Width = activeDocument.width.value;  

var Height = activeDocument.height.value;  

 if(documents.length > 1){  

activeDocument.selection.selectAll();  

activeDocument.selection.copy();  

activeDocument.close(SaveOptions.DONOTSAVECHANGES);   

activeDocument = documents[0];  

app.activeDocument.resizeCanvas(app.activeDocument.width,app.activeDocument.height+Height, AnchorPosition.BOTTOMCENTER);  

activeDocument.paste();  

activeDocument.selection.selectAll();  

align('AdTp');  

app.activeDocument.selection.deselect();  

activeDocument.flatten(); 

    }  

 }else{  

  continue;  

  }  

app.preferences.rulerUnits = strtRulerUnits;   

app.preferences.typeUnits = strtTypeUnits;  

}  

  

function align(method) {   

   var desc = new ActionDescriptor();  

           var ref = new ActionReference();  

           ref.putEnumerated( charIDToTypeID( "Lyr " ), charIDToTypeID( "Ordn" ), charIDToTypeID( "Trgt" ) );   

       desc.putReference( charIDToTypeID( "null" ), ref );   

       desc.putEnumerated( charIDToTypeID( "Usng" ), charIDToTypeID( "ADSt" ), charIDToTypeID( method ) );  

   executeAction( charIDToTypeID( "Algn" ), desc, DialogModes.NO );   

};  

 
Technical Details
Message-ID: <59b6a40f.10@webcrossing.la2eafNXanI>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!newshub.sdsu.edu!webcrossing
References: <59b6a40f.-1@webcrossing.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Thread: f5839,62960464640e583b
X-Google-Attributes: gidf5839,domainid0,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: Paul_R@adobeforums.com
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!newshub.sdsu.edu!webcrossing
Newsgroups: adobe.photoshop.scripting
Subject: Re: Create strip from image sequence
Message-ID: <59b6a40f.10@webcrossing.la2eafNXanI>
Date: Wed, 4 Feb 2009 10:57:59 -0800
References: <59b6a40f.-1@webcrossing.la2eafNXanI>
Lines: 50
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit