2012-06-14 24 views
0

是否有腳本/插件/動作可用,可自動將多個圖像對齊到網格樣式佈局中,例如: wookmark?Photoshop - 將圖像自動對齊到網格

我迫切需要一些東西來實現這一點,作爲一個每週的項目,我必須在PSD中安排大約40個縮略圖。

回答

1

使用JavaScript ...

可以使用數組座標點,像這樣定義一個選擇:

var x = 0; 
var y = 0; 
var w = thumbnailDoc.width; // width of thumbnail document 
var h = thumbnailDoc.height; // height of thumbnail document 

var sel = [ // Define a rectangle of coordinate points 
    [x, y], // moving clockwise from top-left corner of rectangle 
    [x + w, y], 
    [x + w, y + h], 
    [x, y + h], 
    [x, y] //back to start 
]; 

var doc = app.documents.add(200, 200, 72) // create new document (width, height, resolution) 

doc.selection.select(sel); // make a selection using the array of coordinates 
doc.paste(true) // paste the contents of the clipboard 
       // pass in the boolean 'true' to make it paste into the selection 

因此,所有你需要做的是遍歷所有的照片,將它們調整到如果還沒有,請將縮略圖複製到剪貼板,然後粘貼到工作文檔的選區上。隨着你走,你的x,y座標增加,你在散步。

+0

呃,看起來很棒,但我如何在Photoshop中完全使用它? :/ –

+0

對不起,我誤解了,以爲你在寫自己的腳本。如果你想給它一個鏡頭,請在這裏查看http://www.adobe.com/devnet/photoshop/scripting.html。 – pdizz

+0

在我閱讀鏈接之前,我將腳本保存到.jsx文件中並試圖運行它,但是它啓動時「thumbnailDoc.width」未定義。顯然這需要從縮略圖圖像中提取,你會怎麼做?我會立即閱讀鏈接:) –