Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Photoshop Script: exportDocument

I want to save my image as a transparent PNG and wrote a script which suddenly stopped working. I get this error message: Photoshop 11.0.2 error when executing exportDocument

docExportOptions = new ExportOptionsSaveForWeb 

docExportOptions.format = SaveDocumentType.PNG //-24 //JPEG, COMPUSERVEGIF, PNG-8, BMP 
docExportOptions.transparency = true 
docExportOptions.blur = 0.0 
docExportOptions.includeProfile = false 
docExportOptions.interlaced = false 
docExportOptions.optimized = true 
docExportOptions.quality = 100 
docExportOptions.PNG8 = false 

docRef.exportDocument (theFile,ExportType.SAVEFORWEB,docExportOptions) 

Any ideas how to fix that? Or any other solutions to save the docRef as a transparent PNG?

like image 926
tamasgal Avatar asked Apr 14 '11 14:04

tamasgal


People also ask

Can Photoshop be scripted?

Scripting is similar, but instead of doing these steps in Photoshop, you write them down as lines of code. Most actions that you do in Photoshop have their own script equivalent as a function. Let's say you are creating an action that scales a document to 150% of its original size.

Where do you save Photoshop Scripts?

Actions are saved by default in the Photoshop > Presets > Actions folder. Review the options and click OK. Open a file with which to record the action.

How do I open a script in Photoshop?

1 Correct answer. Restart Photoshop then go to File >> Script to access. Restart Photoshop then go to File >> Script to access.


1 Answers

Phew. Solved ^^

The path didn't exist and that error seems to be a standard error. Pretty confusing...

like image 198
tamasgal Avatar answered Nov 09 '22 03:11

tamasgal