Currently Being Moderated
Apr 7, 2008 1:31 AM
I'm using a script to export layers to PNGs - but the filenames are getting screwed up.
Here's the export function:
function saveForWebPNG(name){
var docName = activeDocument.name;
docName = docName.slice(0,-4);
toWhere = new File(fullPath+"/"+docName+name+".png");
var opts = new ExportOptionsSaveForWeb();
opts.format = SaveDocumentType.PNG;
opts.PNG8 = false;
opts.transparency = true;
opts.interlaced = false;
opts.quality = 100;
activeDocument.exportDocument(toWhere, ExportType.SAVEFORWEB, opts);
}
I end up with things like this:
_generic_filter_failed_disabl#0
when it should be:
_generic_filter_failed_disabled.png
I have a feeling this might be to do with the settings trying to limit it to 32 characters (so they're unix compatible) - but if I change the settings in the Save for web dialog it makes no difference.
TIA,
James