Photoshop 脚本:exportDocument

发布于 2024-11-01 17:04:57 字数 669 浏览 1 评论 0原文

我想将图像保存为透明 PNG 并编写了一个突然停止工作的脚本。我收到此错误消息: 执行 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) 

有什么解决办法吗?或者还有其他解决方案可以将 docRef 保存为透明 PNG 吗?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

于我来说 2024-11-08 17:04:57

唷。已解决 ^^

路径不存在,该错误似乎是标准错误。相当混乱...

Phew. Solved ^^

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

聊慰 2024-11-08 17:04:57

文件夹路径是我从Windows资源管理器复制文件夹路径的问题
看起来像

“C:\Users`\Dropbox\android_work\06_Game_tests\car race verti\04
测试”

并将其粘贴到地址栏或互联网浏览器中按 Enter 键
我明白了

“文件:///C:/Users/%60/Dropbox/android_work/06_Game_tests/car%20race%20verti/04%20testing/”

我复制了

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

并将其用于文件夹路径并且它刚刚工作

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文