Skip navigation
Home/Support/

Forums

1816 Views 8 Replies Latest reply: Jul 27, 2009 9:43 AM by davidchambers RSS
Calculating status... 3 posts since
Mar 22, 2007
Currently Being Moderated

Apr 7, 2008 1:31 AM

Save for web filename problems

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

More Like This

  • Retrieving data ...

Bookmarked By (0)