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.
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论