PhotoEdit 板


LINE

※ [本文轉錄自 DSLR 看板 #1CuaarVC ] 作者: pingupingu (OOOOOOOOOOOOOOOOOOOOOOO) 看板: DSLR 標題: [分享] 4:3照片加長成135比例附上時間的PS script 時間: Tue Nov 16 17:04:50 2010 網誌版....->http://imhappypingu.blogspot.com/2010/11/ps-javascript-43135.html 為啥4/3用戶或是DC用戶拍照都只有4.5X6的選擇才能滿版阿!! 只好弄一個script來改一下尺寸 順便利用空白處加上日期吧!! 完成的效果如底下範例圖 http://0rz.tw/eYuJG (註:script主要參考這作者的作品來修改:http://0rz.tw/wqTNo) 請取用下方script或自網誌下載 請大家依排版喜號自行修改使用 // JavaScript Document // "P_43to135addDateTime.js" // 2010/11/16 // reference: http://hk.rd.yahoo.com/blog/mod/art_title/*http://hk.myblog.yahoo.com/vulcanpang/article?mid=1238 // Contact: [email protected] //--------------------------------------START HERE---------------------------------------------------------------- // Default setting displayDialogs = DialogModes.NO; var defaultRulerUnits = preferences.rulerUnits; preferences.rulerUnits = Units.PIXELS; //function define function explodeArray(item,delimiter) { tempArray=new Array(1); var Count=0; var tempString=new String(item); while (tempString.indexOf(delimiter)>0) { tempArray[Count]=tempString.substr(0,tempString.indexOf(delimiter)); tempString=tempString.substr(tempString.indexOf(delimiter)+1,tempString.length-tempString.indexOf(delimiter)+1); Count=Count+1 } tempArray[Count]=tempString; return tempArray; } // Load image var AD = activeDocument; if (AD.height > AD.width) AD.rotateCanvas(90); // vertical image adjustment var resRatio = AD.resolution/314; if(resRatio!=1){ AD.resizeImage(AD.width.value,AD.height.value,314); } // Read EXIF content var exifData = AD.info.exif.toString(); explodeArray(exifData,","); // Find out DateTime info var dateTime=""; 胣肀 for(n = 0; n < tempArray.length; n ++) 胣肀 { 胣肀 stringTemp = tempArray[n]; 胣肀 if(stringTemp.indexOf("Date Time Original") != -1) 胣肀 { 胣肀 dateTime= tempArray[n+1]; 胣肀 break; 胣肀 } 胣肀 } // Reconstruct Time & Date array var dateArray1 = dateTime.split(" "); var phoDate = dateArray1[0]; var phoTime = dateArray1[1]; var dateArray2 = phoDate.split(":"); var dateArray3 = phoTime.split(":"); // Resize image to 135 frame ratio backgroundColor.rgb.red = 0; backgroundColor.rgb.green = 0; backgroundColor.rgb.blue = 0; var heightVar = AD.height.value var photoWidth = AD.width.value; AD.resizeCanvas(AD.height.value*1.5,AD.height.value, AnchorPosition.MIDDLELEFT); // or TOPCENTER, MIDDLECENTER... // Add Time Date text var PRatio = heightVar/2736; // Based on 2736 pixels/height image // Add new text layer : date var infoLayer = AD.artLayers.add(); infoLayer.kind = LayerKind.TEXT; var TI = infoLayer.textItem; TI.justification = Justification.CENTER; // align center TI.position = [(photoWidth+AD.width.value)/2,heightVar-200*PRatio]; // push in the mid of the dark bar TI.contents = dateArray2[0]-1911+" "+dateArray2[1]+" "+dateArray2[2]; TI.font = "Courier"; TI.size = 16*PRatio; TI.color.rgb.red = 255; TI.color.rgb.green = 255; TI.color.rgb.blue = 255; TI.antiAliasMethod = AntiAlias.NONE; //TI.fauxBold = true; // bold font // Add new text layer : time var infoLayer = AD.artLayers.add(); infoLayer.kind = LayerKind.TEXT; var TI = infoLayer.textItem; TI.justification = Justification.CENTER; TI.position = [(photoWidth+AD.width.value)/2,heightVar-60*PRatio]; TI.contents = dateArray3[0]+" "+dateArray3[1]+" "+dateArray3[2]; TI.font = "Courier"; TI.size = 16*PRatio; TI.color.rgb.red = 255; TI.color.rgb.green = 255; TI.color.rgb.blue = 255; TI.antiAliasMethod = AntiAlias.NONE; //TI.fauxBold = true; AD.flatten(); // flatten image // -------------------------------End of this script..........--------------------------- --



※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 118.165.173.113 ※ 編輯: pingupingu 來自: 118.165.173.113 (11/16 17:06)
1F:推 willloxa:APS-C用4X6也是會被裁到 4.5X6才會正確顯示 11/16 17:13
2F:推 doglegbow:可是nikon的APS-C比例是2:3阿~~ 11/16 17:16
3F:→ pingupingu:原來是這樣喔..那就想用的人就自己改改吧XD 11/16 17:17
--



※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 118.165.173.113
4F:推 volgarv:讚,雖用不到還是大推 11/20 09:03
5F:→ pingupingu:謝謝你! 11/24 23:23







like.gif 您可能會有興趣的文章
icon.png[問題/行為] 貓晚上進房間會不會有憋尿問題
icon.pngRe: [閒聊] 選了錯誤的女孩成為魔法少女 XDDDDDDDDDD
icon.png[正妹] 瑞典 一張
icon.png[心得] EMS高領長版毛衣.墨小樓MC1002
icon.png[分享] 丹龍隔熱紙GE55+33+22
icon.png[問題] 清洗洗衣機
icon.png[尋物] 窗台下的空間
icon.png[閒聊] 双極の女神1 木魔爵
icon.png[售車] 新竹 1997 march 1297cc 白色 四門
icon.png[討論] 能從照片感受到攝影者心情嗎
icon.png[狂賀] 賀賀賀賀 賀!島村卯月!總選舉NO.1
icon.png[難過] 羨慕白皮膚的女生
icon.png閱讀文章
icon.png[黑特]
icon.png[問題] SBK S1安裝於安全帽位置
icon.png[分享] 舊woo100絕版開箱!!
icon.pngRe: [無言] 關於小包衛生紙
icon.png[開箱] E5-2683V3 RX480Strix 快睿C1 簡單測試
icon.png[心得] 蒼の海賊龍 地獄 執行者16PT
icon.png[售車] 1999年Virage iO 1.8EXi
icon.png[心得] 挑戰33 LV10 獅子座pt solo
icon.png[閒聊] 手把手教你不被桶之新手主購教學
icon.png[分享] Civic Type R 量產版官方照無預警流出
icon.png[售車] Golf 4 2.0 銀色 自排
icon.png[出售] Graco提籃汽座(有底座)2000元誠可議
icon.png[問題] 請問補牙材質掉了還能再補嗎?(台中半年內
icon.png[問題] 44th 單曲 生寫竟然都給重複的啊啊!
icon.png[心得] 華南紅卡/icash 核卡
icon.png[問題] 拔牙矯正這樣正常嗎
icon.png[贈送] 老莫高業 初業 102年版
icon.png[情報] 三大行動支付 本季掀戰火
icon.png[寶寶] 博客來Amos水蠟筆5/1特價五折
icon.pngRe: [心得] 新鮮人一些面試分享
icon.png[心得] 蒼の海賊龍 地獄 麒麟25PT
icon.pngRe: [閒聊] (君の名は。雷慎入) 君名二創漫畫翻譯
icon.pngRe: [閒聊] OGN中場影片:失蹤人口局 (英文字幕)
icon.png[問題] 台灣大哥大4G訊號差
icon.png[出售] [全國]全新千尋侘草LED燈, 水草

請輸入看板名稱,例如:Gossiping站內搜尋

TOP