Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using photoshop files from web application

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

Is there any php or C# API to can do it?

like image 981
Ehsan Avatar asked Nov 19 '12 09:11

Ehsan


People also ask

How do I access Photoshop from a website?

To get started, you'll need a Creative Cloud subscription. Then, to use Photoshop on the web, simply update Photoshop to the latest version to access the new comments panel. Next, go to Creative Cloud > Files > Your files. Open any Photoshop file and select the Open in Photoshop on the web beta button in the header.

Can you access Photoshop from browser?

You can now use Adobe Photoshop on your desktop browser.

How do I export a Photoshop file from a website?

The process is simple. Open a photo, and choose File > Save For Web. Then choose a format from the file format menu (GIF, JPEG, PNG‑8, or PNG‑24) and set options as desired.

How do I import an image from the Internet to Photoshop?

As already mentioned, the import using the drag-and-drop method is often the easiest way to import photos in Photoshop. Open Photoshop and drag a photo from the Explorer or from your desktop onto the Photoshop user interface. Once you release the left mouse button, the image is opened as a new document.


3 Answers

First of all, I would like you to reflect on the legality of such a thing. Would Adobe let you practically just proxy their application to the web? I see they have a lot of licenses so maybe one of them actually grants you permission to do this (however, there could still be caveats so I suggest you read up on that). As that's not the question, I won't talk about this anymore, I just wanted to to mention it as it should be relevant.

Now, for the actual question - if you look at Microsoft Office Interop, Microsoft states that it is unsupported in a server-side environment. Go to this Microsoft page and read Problems using server-side Automation of Office in the More information section.

There are several issues if you decide to run a regular client application server-side, as stated on the mentioned page, but one of the most significant issues is the following:

Interactivity with the desktop: Office applications assume that they are being run under an interactive desktop. In some circumstances, applications may need to be made visible for certain Automation functions to work correctly. If an unexpected error occurs, or if an unspecified parameter is needed 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 dismissed. Therefore, that thread stops responding (hangs) indefinitely. Although certain coding practices can help reduce the likelihood of this issue, these practices cannot prevent the issue entirely. This fact alone makes running Office Applications from a server-side environment risky and unsupported.

While this is written by Microsoft for their product, these are more or less applicable to any regular client application. And even if you still decided to go with this approach, as Neville K already suggested, it would be a very resource-hungry task.

Considering the above, I would maybe ask a different question, along the lines of "What library or server-side app to use for doing whatever you need to do with images".

like image 122
Bikonja Avatar answered Oct 09 '22 18:10

Bikonja


Based on this link, you can do this things with Photoshop SDK: "With the Photoshop SDK, you can enable your apps to drive and/or communicate with Photoshop CS6 (version 13.0.0 or later) via a TCP connection. It’s now possible to create an eBook of Photoshop tutorials that allows users to drive actions in Photoshop CS6 from within the eBook"

like image 23
Amino Avatar answered Oct 09 '22 19:10

Amino


This sound like hard but some companies seems to make it work. Xee can read PSD too (and has an epic comment about this format in the source code).

But to quote someone over at HN:

PSD was never intended to be a data interchange format: it is the serialization format of a single program that has more individual unrelated features that actual people rely on than almost any other piece of software and has maintained striking amounts of backwards compatibility and almost unbroken forwards compatibility during its over two decades of existence. This product's "file format" needs to be critiqued in this context, along with similar mega-programs like Office. I am thereby having a difficult time fathoming why anyone would think that a PSD file is thereby going to be some well-organized file format that they should easily be able to parse from their own application is just naively wishful thinking: even other products from Adobe have limitations while opening these files; to truly manipulate these files you really need to be highly-compatible with Photoshop's particular editing model (hence the conceptual difference between these two classes of file format).

I would recommand to look at Xee for a server side utility.

Good luck.

like image 3
Damien Avatar answered Oct 09 '22 19:10

Damien