Using photoshop files from a web application

I want to interact with a Photoshop file and create images using its actions and smart objects.

Is it possible to use php or C # API?

+6
source share
5 answers

It sounds like hard, but some companies seem to be doing the job . Xee can read the PSD too (and has an epic comment about this format in the source code ).

But to quote someone over in HN :

PSD was never intended for data exchange : it is a serialization format for one program that has more individuality that people actually rely on than almost any other piece of software and has retained amazing amounts of backward compatibility and almost continuous advanced compatibility during its two decades of existence. This "file format" of the product must be criticized in this context, along with similar mega-programs such as Office. Therefore, I have a difficult time when someone has a PSD file that will be a well-organized file format that they should easily analyze from their own application - this is just a naive wishful thinking: even other Adobe products have limitations when opening these files ; To truly manipulate these files, you really need to be very compatible with Photoshop for a specific editing model (hence the conceptual difference between the two classes of file format).

I would recommend looking at Xee for a server-side utility.

Good luck.

+3
source

First of all, I would like you to think about the legality of such a thing. Will Adobe let you practically proxy your application online? I see that they have many licenses, so perhaps one of them actually gives you permission to do this (however, there may still be reservations, so I suggest you read about it). Since this is not a question, I will not talk about it anymore, I just wanted to mention it, because it should be important.

Now, for the actual question - if you look at Microsoft Office Interop, Microsoft claims that it is not supported in a server environment. Go to this Microsoft page and read "Server-side Office Automation Issues" in the "More Information" section.

There are several problems if you decide to run a regular client program on the server side, as indicated on the specified page, but one of the most significant problems:

Interaction with the desktop: Office applications assume that they run under the interactive desktop. In some cases, applications may need to make certain automation functions visible to function properly. If an unexpected error occurs or an undefined parameter is required to complete a function, Office is designed to prompt the user with a modal dialog box that asks the user what the user wants to do. A modal dialog box on a non-interactive desktop cannot be rejected. Therefore, this thread stops responding (hangs) indefinitely. While some coding techniques may help reduce the likelihood of this problem, this practice cannot completely prevent the problem. This fact alone makes running Office applications from a server environment dangerous and unsupported.

Although it was written by Microsoft for their product, they are more or less applicable to any regular client application. And even if you decide to go with this approach, as suggested by Neville K, it will be a very resource-intensive task.

Considering the above, I could ask another question in accordance with the fact that "which library or application on the server side is used to perform any actions with images."

+8
source

Based on this link , you can do this using the Photoshop SDK : "Using the Photoshop SDK, you can enable your applications to control and / or interact with Photoshop CS6 (version 13.0.0 or later) using a TCP connection. Now you can create eBook of Photoshop tutorial that allows users to control actions in Photoshop CS6 from the book "

+4
source

You can use the scripting interface to run Shell tasks from any web language if you really want to.

However, I am seriously worried about this approach - the memory requirements for Photoshop are such that you can only support a couple of users, and you need a rather sophisticated polling mechanism to check the results of the β€œshell” task. Thus, Photoshop was just not designed to power websites this way.

Instead, consider using graphic libraries - I used ImageMagick with great effect in the past.

+2
source

Observe the warnings that you really cannot process more than one or two images at the same time as Photoshop without a server crash, so just placing it on your web server is not a starter. The lighter weight image library is much better for most tasks.

But you could queue jobs from your web application and then process them on another computer or limit it to only one at a time.

Adobe has macros and a complete scripting environment for action / javascript scripts that you can run from the command line or com.

Adobe Scripting Guide

http://wwwimages.adobe.com/www.adobe.com/content/dam/Adobe/en/devnet/photoshop/pdfs/photoshop_cs5_scripting_guide.pdf

For older versions of Photoshop, you can use the macro function to record the action. Then create drops from the action. Call a drop from the command line with the image file as the only parameter. The path to the image file should probably be absolute.

+2
source

All Articles