English 中文(简体)
How to Process HTTP Response to Obtain Image Content
原标题:

I m trying to integrate a web service that serves PNG images into Photoshop using JSX/ExtendScript. To accomplish this, I create a Socket (TCP) and write the user configurable parameters in the GET request. The server then returns an HTTP response, which I have been able to read line by line, to verify that it has the correct Header information (eg, Content-Type: image/png). However, I m at a loss as to how to process the HTTP response in order to get some type of image data that can be pasted into a Photoshop ArtLayer. As of now, when I process it as ASCII, all I see is that the ninth or tenth line has "██PNG███", which is where I assume the data starts.

Anyone have any idea how to accomplish this? Is there perhaps an existing JavaScript library that could handle such processing? As far as I can tell, the Photoshop and ExtendScript libraries are rather limited in this respect.

Update

I still haven t figured this out. However, I instead ended up making a Creative Suite Extension in AIR (using Flash Builder + Creative Suite SDK), which was much simpler and integrates into Photoshop (and Illustrator and In-Design ...) much better than I think the script would have anyway. Flex already has URL resource loaders, and I used AIR in particular so that I could push content onto the clipboard, which could then be copied/dragged into a layer.

I would still like to know how this could have been done with a JSX script, as I think it is possible.

问题回答

暂无回答




相关问题
Photoshop Batch Action Save for Web and Devices

I created an Action in Photoshop CS4. It s something like this: Open Document Change Canvas Size Save for Web & Devices Close Document Now, the "Save for Web & Devices" does all nice stuff, ...

Photoshop-like, embeddable web based image editor? [closed]

Online Image Editor - Ajax or Flex / Flash? The above wasn t really the answer that I was looking for. I m looking for an online image editor which I can embed into my pages, so users can edit ...

Output W3C compliant XHTML from image slices

When slicing and saving for web in Photoshop CS4, the HTML layout output by Photoshop is done using tags, which is not what we want. Is there a way to get Photoshop to output W3C compliant tableless ...

Photoshop style GUI design

In a tool such as Photoshop, there is a selection of tools you can click on (e.g. pen, brush etc). Once you click on a tool, you can use that tool to paint, erase etc depending on what tool is ...

热门标签