2013-08-16 39 views
0

我需要創建一個動作: 1.在已打開的文件中複製圖像的選定部分(手動選擇) 2.將選擇粘貼到新文件中 3.將新文件保存爲jpg文件,但不使用默認文件名「untitled.jpg」 - 而是使用唯一名稱或使用自動遞增後綴Photoshop保存爲獨特名稱步驟

因爲該操作將在不同選擇上運行多次從相同的圖像中,使用唯一的名稱或自動遞增的後綴保存每個選擇將保存每次保存不同選擇時手動提供文件名的步驟。

我可以創建一個獲取到另存爲步驟的操作,但不知道是否可以將默認保存修改爲名稱,如上所述。可能嗎?

回答

0

否。之前嘗試過,沒有成功。你必須手動保存。

0

不要認爲這是可能的行動,但你可以寫一個腳本做到這一點。

0

我爲類似的工作創建了一個腳本。它使用一種技術來生成獨特的文件名並保存文件。

/************************************************************************ 
* Author: Nishant Kumar 
* Description: This script iterates through a template to create 
* jpg images with id card numbers. 
* Date: 08-03-2015 
***********************************************************************/ 
//current id count 
var id_count = 0; 
//total no of id cards to produce 
var total_id_cards = 42; 
//no. of cards per sheet 
var card_per_sheet = 21; 
//Save path related to current file 
var save_path = app.activeDocument.path; 

//do an iteration, number the cards and save file 
do{ 

    //iterate 24 nos in each document 
    for(var i = 0; i<card_per_sheet; i++){ 
     id_count++; 
     app.activeDocument.layers[i].textItem.contents = id_count; 
    } 

    //Create a jpg document with standard options 
    jpgSaveOptions = new JPEGSaveOptions(); 
    jpgSaveOptions.embedColorProfile = true; 
    jpgSaveOptions.formatOptions = FormatOptions.STANDARDBASELINE; 
    jpgSaveOptions.matte = MatteType.NONE; 
    jpgSaveOptions.quality = 12; 

    //Save jpg with incremental file names (1.jpg, 2.jpg), make sure the path exists 
    jpgFile = new File(save_path + "/output/" + id_count/card_per_sheet + ".jpeg"); 
    app.activeDocument.saveAs(jpgFile, jpgSaveOptions, true,  Extension.LOWERCASE); 

}while(id_count < total_id_cards); 
+1

以及如何在photoshop中使用此腳本? (我是一個noob) –