Assumes: you have Photoshop CS3, a Style saved called 'Black' which is a layer blend, color overlay, black #000000 at 100% opacity. (make this, duh)
Also assumes: you have a folder full of sequentially numbered png images with a prefix such as: 'a001.png', 'a002.png', 'a003.png'
Lastly assumes that you want to give 100% black opacity to the first, 50% to the second, and 0% to the third (or if you have 100 files, decreasing amounts of 1% opacity to each until you get to 0%).
Save the below as a .jsx file. Known error: odd/even numbers of files will yield opacity <0, giving an error right at the end. Round doesn't fix it. It's not a game killer, so I don't care at this point, honestly.
Other issue: LJ must hate semicolons. Security issue? Perhaps. Put one at the end of each line except for the first, the one ending with { and the one ending with }
Then File >> Scripts >> Browse and sit back and enjoy. :)
#target photoshop
app.bringToFront()
var filePrefix = "css"
var fileExtension = ".png"
var firstNum = 342
var lastNum = 380
var currentNum = 0
fileObj = new File()
var inputFolder = Folder.selectDialog("Select a folder of images to process")
filePrefix = prompt("file prefix, but not the number or extension. such as: a or css or dsc")
fileExtension = prompt("file extension including dot such as .png")
firstNum = prompt("first file number such as 001")
lastNum = prompt("last file number such as 999")
currentNum = firstNum
var fileRef = File(inputFolder+"/"+filePrefix+currentN
alert (fileRef)
var docRef = app.open(fileRef)
pngSaveOptions = new PNGSaveOptions()
pngSaveOptions.interlaced = false
while (currentNum < lastNum+1) {
docRef.backgroundLayer.copy()
docRef.paste()
docRef.activeLayer.applyStyle ("Black")
docRef.activeLayer.opacity = (100*(((lastNum-currentNum)/(lastNum-fir
docRef.flatten()
docRef.save(pngSaveOptions)
docRef.close()
currentNum++
fileRef = File(inputFolder+"/"+filePrefix+currentN
docRef = app.open(fileRef)
}
docRef.close()
alert ("Done")
......
X into
XX
XX
this is the droplet/script for you! :)
http://www.megaupload.com/?d=Y6WUU1IR
Brief tutorial on droplets: download droplet to desktop (or anywhere), open folder with files to modify, select files and drag/drop them onto the droplet icon where you saved it (desktop of whatever). Will open photoshop and batch run them all. Kick butt.
This droplet (exe) is clean and safe, but feel free to run it thru ur Norton or AVG or whatever first. Lord knows I would. :)
Enjoy!
- Mood:creative
crushed
excited