![]() |
|
|
#1 (permalink) |
|
Addict
Location: TN
|
Photoshop Script Needed ... Badly!
Hey guys (and gals) I am in a desperate need of a Photoshop scipt. I've searched several places and can't find what I'm needing. What I need is a script that will convert .tiff images to .jpeg using the save for web function in Photoshop. I tried using the image processor but the file size is still a little big. I also tried using a couple other programs like Irfan but they dont produce a clear crisp image like Photoshop. Id appreciate any ideas or suggestion; I have about 1000 images to do. Thanks in advance!
|
|
|
|
|
#2 (permalink) |
|
Upright
Location: WA......somewhere....I hope......
|
Are you opposed to running an app developed by a complete stranger? I have no clue on how to write photoshop scripts, but I could code up a quick c# app.........
~Drego
__________________
There is no such thing as "Bug Free" software....there is only software with an acceptable (and documented) level of failure. Hack the Planet!!!! |
|
|
|
|
#4 (permalink) | |
|
Insane
Location: Somewhere
|
Quote:
There are a couple of settings in the script that you can customize: SaveForWeb(saveFile,60); <-- You can change that number to whatever JPEG quality setting you want var saveFile = new File(decodeURI(activeDocument.fullName.fsName).slice(0,-4) + "_web.jpg"); <--- This appends "_web.jpg" to the file name, change this to whatever you want, just make sure ".jpg" is at the end Code:
var imageFolder = Folder.selectDialog("Select the folder with TIFs to process");
if (imageFolder != null) processFolder(imageFolder);
function processFolder(folder) {
var fileList = folder.getFiles()
for (var i = 0; i < fileList.length; i++) {
var file = fileList[i];
if (file instanceof File && file.name.match(/\.tif$/i)) {
open(file);
var doc = app.activeDocument;
var strtRulerUnits = app.preferences.rulerUnits;
var strtTypeUnits = app.preferences.typeUnits;
app.preferences.rulerUnits = Units.PIXELS;
app.preferences.typeUnits = TypeUnits.PIXELS;
var saveFile = new File(decodeURI(activeDocument.fullName.fsName).slice(0,-4) + "_web.jpg");
saveFile.remove();
SaveForWeb(saveFile,60);
app.activeDocument.close(SaveOptions.DONOTSAVECHANGES);
app.preferences.rulerUnits = strtRulerUnits;
app.preferences.typeUnits = strtTypeUnits;
} else
if (file instanceof Folder) {
processFolder(file);
}
}
}
function SaveForWeb(saveFile,jpegQuality) {
var sfwOptions = new ExportOptionsSaveForWeb();
sfwOptions.format = SaveDocumentType.JPEG;
sfwOptions.includeProfile = false;
sfwOptions.interlaced = 0;
sfwOptions.optimized = true;
sfwOptions.quality = jpegQuality;
app.activeDocument.exportDocument(saveFile, ExportType.SAVEFORWEB, sfwOptions);
}
Last edited by captobvious; 10-19-2007 at 09:35 AM.. |
|
|
|
| Tags |
| badly, needed, photoshop, script |
|
|