Command line manipulation of PhotoShop images

2019-02-10 16:34发布

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.

4条回答
对你真心纯属浪费
2楼-- · 2019-02-10 16:53

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).

查看更多
男人必须洒脱
3楼-- · 2019-02-10 16:58

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楼-- · 2019-02-10 16:59

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/

查看更多
该账号已被封号
5楼-- · 2019-02-10 17:10

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).
查看更多
登录 后发表回答