4 Replies Latest reply on Nov 6, 2014 4:04 PM by johnrellis

    How to find full path to active photo or thumbnail of it




      I'm new to the Lightroom SDK, so forgive me, if this question has been asked, but I have been at it for some days and can't figure it out.


      The scenario which I'm trying to achieve is this:


      Create a plugin that suggests keywords for an image based on what the image contains. The steps that I'm currently planning on taking are these:


      1. Have a dialog that opens from the Plug-in Extras menu.

      2. When the dialog is opened, I need to send a post multipart request, containing (preferably) a thumbnail of the image, or the original image for processing. When the response is received, keywords are added to the dialog and the user can check/uncheck them and add new keywords if he wishes.

      3. When the editing part is done, the user hits a save keywords button to save the keywords as IPTC data to the image.


      Currently I'm having problems sending the image via the LrHttp.postMultipart function. What I've tried is use the output value of a LrPhoto requestJpegThumbnail call, but it doesn't seem to work the way I think, so the best way I guess is to save the thumbnail somewhere on the file system and retrieve the full path for it, or retrieve the full path of the LrPhoto itself (which I can't seem to find out how to do).


      In short what I am asking is how do I get the full path of a LrPhoto object, or how to save a thumbnail of it on the filesystem and retrieve the full path for it.