I'm trying to export certain visible layers to png in photoshop cs5 using the "export layers to files" script, but all it does is make a copy of the psd in a new tab and freeze. I tried in cs4 and cs5. Are there any considerations I need to be aware of?
2 Answers
The first thing I would try is to purge history and clipboard, just to clear out some cobwebs in RAM and scratch space. If that didn't do it, I'd next log out then log back in. Then, if I hadn't restarted the OS in the last week or so, I'd do that. Next I would reset Photoshop's preferences (click the icon to launch the program, then immediately hold down "the left hand side of the keyboard" -- Cmd-Opt-Shift or Ctl-Alt-Shift, depending on platform.
Most likely the problem will disappear somewhere in that sequence. If not, verify that you have enough RAM and scratch space (and that the scratch drive isn't full, corrupted or failing). On Mac, repairing permissions and clearing out caches is sometimes the fix for random errors that don't seem to have a clear cause inside the application. On Windows, defragging the scratch drive can help in some situations.
-
yep tried all those. then i went out and got a new macbook pro (needed one anyway ;) ), istalled photoshop cs5 on it, same problem. just kind of hangs up. I did get it to work on the original macbook, after leaving it all night it finally exported the 4 layers. no idea why it's not working faster.– MartyCommented Jun 2, 2011 at 19:26
-
it usually says "Error: General Photoshop error occurred. This functionality may not be available in this version of Photoshop." and then has another message below. this time it was "The object “document 71” is not currently available."– MartyCommented Jun 2, 2011 at 19:27
-
Clean install on a clean OS? That's very strange. How large is the file (pixel dimensions and file size)? Anything unusual about the layers (EPS placed as a Smart Object, stuff like that)? Commented Jun 2, 2011 at 20:17
-
hmm...they're just 100X100 about. they are made of a text layer and a smart object that i merged into one layer. would that matter?– MartyCommented Jun 2, 2011 at 20:55
-
1Something is wadically wong wif dat. Four rasterized layers 100 pixels square should export in about half a hearbeat. Basic troubleshooting: isolate the problem. Create a new document the same size as this one, give it some roughly-equivalent layers, and run the script. If that succeeds, then the problem is only in the one document, so you could try making a fresh document and copying the layers into it one at a time, then export from the new one. Commented Jun 2, 2011 at 22:20
I've run into the same issue and my problem was that the bitdepth of the source and destination documents were not the same.
So in your script, when you create a new document to copy your layer make sure that the bitdepth is the same as your source:
var destDoc = app.documents.add(
sourceDoc.width,
sourceDoc.height,
sourceDoc.resolution,
tmpDocName,
NewDocumentMode.RGB,
DocumentFill.TRANSPARENT,
1,
sourceDoc.bitsPerChannel
);