简体   繁体   中英

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: 执行exportDocument时出现Photoshop 11.0.2错误

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?

Phew. Solved ^^

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

The folder path was the problem i copied the folder path from windows explorer it looks like

"C:\\Users`\\Dropbox\\android_work\\06_Game_tests\\car race verti\\04 testing"

and pasted it in adress bar or the internet broser pressed enter i got this

"file:///C:/Users/%60/Dropbox/android_work/06_Game_tests/car%20race%20verti/04%20testing/"

i copied

"C:/Users/%60/Dropbox/android_work/06_Game_tests/car%20race%20verti/04%20testing/"

and used it for folder path and It just worked

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM