Command line manipulation of PhotoShop images

99封情书 提交于 2019-11-29 21:15:26

问题


Are there any tools for editing PhotoShop files from a command line?

I would like to add steps to our automated build process (MS Build) that takes original PhotoShop files that our artists make and produce .png files; I'm looking at a very few operations like photoshop-to-png, resize and possibly showing/hiding layers. I haven't had a lot of luck finding a tool I can use for this.

If it is possible to script this with Photoshop itself, or a Photoshop utility, that'd be awesome.


回答1:


You've got a few options in your case:

  1. Using variables/datasets in Photoshop
  2. As b3bop, using JavaScript(jsx). Quickest way to get started is to open up ExtendScriptToolkit (should be in the Adobe Utilities),connect to Photoshop and open the Object Model Viewer for Photoshop.If it helps, Photoshop also supports VB on Windows.
  3. CommandLine manipulation via Matlab/Photoshop (though this might be a bit much for your current use case).



回答2:


I know that you are looking to use Photoshop, but one non-photoshop option is an open source tool called Image Magick. It has a command line tool that is extremely flexible.

http://www.imagemagick.org/




回答3:


Ive never done this, but I believe you can control PS with JavaScript. You might find this document helpful: http://wwwimages.adobe.com/www.adobe.com/content/dam/Adobe/en/devnet/photoshop/pdfs/photoshop_cs5_scripting_guide.pdf




回答4:


ImageMagick, GraphicsMagick (a fork of the former; for the former you would use the convert CLI, for the latter you would invoke gm convert), nConvert, Krita CLI, and probably a Gimp CLI, or GMIC--these can all accomplish this.

All will accept a Photoshop file as input, and output virtually (if not actually) the entire range of existing image formats (including Photoshop).



来源:https://stackoverflow.com/questions/8918405/command-line-manipulation-of-photoshop-images

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