2 Replies Latest reply on Apr 18, 2012 8:34 AM by Chris Cox

    grab image from photoshop using sdk


      the following sampe in the sdk shows how the client requests

      a thumbnail from photoshop.



      var idNS = stringIDToTypeID("sendDocumentThumbnailToNetworkClient")

      var desc1 = new ActionDescriptor();

      desc1.putInteger( stringIDToTypeID("width"  ), 640;

      desc1.putInteger( stringIDToTypeID("height" ), 400);

      desc1.putInteger( stringIDToTypeID("format" ), 1);

      executeAction( idNS, desc1, DialogModes.NO );


      The command above sends an image to the client, which has no metadata like exif.



      BUT how can the client request a full  IMAGE (Picture with metadata and not downsized) not a thumbnail from photoshop

      sending it to the client ??? Is there any message like above ?


      where are the messages listed like "sendDocumentThumbnailToNetworkClient"

      and other, I can't find them anywhere ??


      best regards


        • 1. Re: grab image from photoshop using sdk
          Tom Ruark Adobe Employee

          Ask Photoshop what the size of the image is and request it in the width and height.

          Make a second request for the xmp data via JavaScript. activeDocument.xmpMetadata.rawData

          The list of commands can be found on this page documentation/pages/index.html

          Consult the JavaScript documentation for all the things you can do with that API. The documents are part of you Photoshop install in the Scripting folder.

          • 2. Re: grab image from photoshop using sdk
            Level 7

            You can't get the full image file, or metadata that way.

            You can only get a preview/thumbnail - although you can request a thumbnail at a fairly large size.


            And the network messages are documented in the SDK along side the network example code.