Photoshop Script: exportDocument

南楼画角 提交于 2019-12-23 09:33:58

问题


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

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?


回答1:


Phew. Solved ^^

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




回答2:


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



来源:https://stackoverflow.com/questions/5664750/photoshop-script-exportdocument

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!