通过ASP.NET或PHP自动化Photoshop [关闭]

通过ASP.NET或PHP自动化Photoshop [关闭]

问题描述:

I want to start a web project in which:

  1. User first signs up.
  2. Uploads his desired favorite image to website.
  3. Selects which action, filter, plugin or even photo editing feature he wants to be applied to the image and the solution came to my mind is automating Photoshop, I mean user submits his request to the server and server opens up Photoshop and automatically applies the desired operation through Photoshop to the image uploaded by user and saves and returns back the result to the user.

Now the problem is that how can i do so and automate Photoshop through ASP.NET or PHP. Any solutions appreciated.

我想启动一个Web项目,其中包括: p>

    用户首先注册。 li>
  1. 将他想要的图像上传到网站。 li>
  2. 选择要应用的动作,过滤器,插件甚至照片编辑功能 对于图像,我想到的解决方案是自动化Photoshop,我的意思是用户将他的请求提交给服务器,服务器打开Photoshop并自动将所需的操作通过Photoshop应用到用户上传的图像并保存并将结果返回给 用户。
    li> ol>

    现在问题是我该怎么做并通过 ASP.NET code>或 PHP code>。 感谢任何解决方案。 p> div>

The very first thing you need to check out is Adobe's licensing on using Photoshop in this fashion.

Once you've addressed any licensing concerns, it would be fairly straightforward to automate. You need to write the actual photoshop automation part using Adobe's ExtendScript (a flavor of javascript) to do the image manipulation you want. If you include the line '#target Photoshop' at the top of this script that should take care of making sure Photoshop is automatically launched when you execute your script from ASP.NET or PHP.

Chances are you'll want to pass parameters to your scripts - and the only way I am aware to do this would be to write them to a parameters.xml file in a predefined location so that the script can read them in from there. I do not think you can supply them directly when you call your script.

You won't have a good way to tell when Adobe is finished with the image. The best thought I can come up with off the top of my head is to predefine an image drop location and have ASP.NET/PHP poll for the resulting image occasionally. Depending on what you are doing, and what size images the manipulation could take a significant amount of time - you may want to come up with an alternative solution.

ETA: From .NET you can also automate photoshop more directly via its COM interface. You'll need to do a bit more research to get it working, but this link should get you pointed in the right direction.