「2時間しか寝てないアプリ」iPhone版を申請しました&サムネ全自動化jsx公開
1週間くらいで公開される予定。。
ついでにitune connect審査用、全自動サムネ生成PhotoShopバッチ(.jsx)作りました(以前公開したのは半自動)。
1.jpg~5.jpgという名前の、適当なサムネ画像の元ファイルがあるフォルダに、jsxファイルをコピペして使う前提。変数のdirNameはコピペしたフォルダパス名で書き換えてください。
自動化できるところはどんどん自動化して、どんどんリリースしよう。
var time=new Date().getTime(); var dirName = "/Users/ひさし/Desktop/flash/2時間しか寝てないアプリ/capture/"; var names = ["1.jpg","2.jpg","3.jpg","4.jpg","5.jpg"]; var dirs = [dirName + "iPad 1024x768/", dirName + "iPhone4S 960x640 3.5インチ/", dirName + "iPhone5 1136x640 4インチ/", dirName + "iPhone6 1334x750 4.7インチ/", dirName + "iPhone6 plus 1242 x 2208 5.5インチ/"]; for(var i0=0; i0<dirs.length; i0++){ new Folder(dirs[i0]).create(); for(var i=0; i<names.length; i++){ fileObj0 = new File(dirName+names[i]); open(fileObj0); if(i0==0){ //画像解像度:高さ:1024 preferences.rulerUnits = Units.PIXELS; activeDocument.resizeImage(activeDocument.width*(1024/activeDocument.height),1024); //カンバスサイズ:幅:768 preferences.rulerUnits = Units.PIXELS; activeDocument.resizeCanvas(768, 1024);//,activeDocument.width); }else if(i0==1){ //画像解像度:幅640 preferences.rulerUnits = Units.PIXELS; activeDocument.resizeImage(640, activeDocument.height*(640/activeDocument.width)); //カンバスサイズ:高さ960 preferences.rulerUnits = Units.PIXELS; activeDocument.resizeCanvas(640, 960);//,activeDocument.width); }else if(i0==2){ //画像解像度:幅640 preferences.rulerUnits = Units.PIXELS; activeDocument.resizeImage(640, activeDocument.height*(640/activeDocument.width)); //カンバスサイズ:高さ1136 preferences.rulerUnits = Units.PIXELS; activeDocument.resizeCanvas(640, 1136);//,activeDocument.width); }else if(i0==3){ //画像解像度:幅750 preferences.rulerUnits = Units.PIXELS; activeDocument.resizeImage(750, activeDocument.height*(750/activeDocument.width)); //カンバスサイズ:高さ1334 preferences.rulerUnits = Units.PIXELS; activeDocument.resizeCanvas(750, 1334);//,activeDocument.width); }else if(i0==4){ //画像解像度:幅1242 preferences.rulerUnits = Units.PIXELS; activeDocument.resizeImage(1242, activeDocument.height*(1242/activeDocument.width)); //カンバスサイズ:高さ2208 preferences.rulerUnits = Units.PIXELS; activeDocument.resizeCanvas(1242, 2208);//,activeDocument.width); } fileObj = new File(dirs[i0]+(i+1)+".png"); pngOpt = new PNGSaveOptions(); pngOpt.interlaced = false; activeDocument.saveAs(fileObj, pngOpt, true, Extension.LOWERCASE); activeDocument.close(SaveOptions.DONOTSAVECHANGES); //break; } //break; } app.beep(); alert("Finish! "+((new Date().getTime()) - time));