duanfu9523 2014-08-16 07:58
浏览 47
已采纳

通过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.

  • 写回答

1条回答 默认 最新

  • duanjipiao7076 2014-08-16 12:41
    关注

    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.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?