4 Replies Latest reply on May 17, 2011 12:44 PM by ckhorne

    Access to preview data?

    ckhorne Level 1

      Is there any way to get access to the latest preview data from within the API?

       

      I realize I could write an LrExport module, but I'm looking to manage the images from a regular plugin. I've looked through the SDK documentation, and I don't see anything that would allow me to get to the latest image data. Specifically, I'd like to generate jpg's of a given LrPhoto, using the currently applied settings, so that I can do something with them. Either this isn't possible or I'm just not seeing it?

       

      Does anyone have any information that can help me?

        • 1. Re: Access to preview data?
          areohbee Level 5

          Lr preview data is not supported by SDK, although I've requested that as a feature.

           

          Previews are readily accessible once you know the ID to use, but the ID's are in the lrcat file which is locked in Lightroom.

           

          So, I've resorted to a script that reads the lrcat file (via sql) and makes a list of ID's then starts Lightroom. That works except newly imported photos are inaccessible without restarting...

           

          -R

          • 2. Re: Access to preview data?
            ckhorne Level 1

            Thanks for the quick response.

             

            I suppose when you say "ID", you're referring to something other than the photo's UUID? And once you have this ID, how do you extract the preview?

             

            Hmm- I was just checking the sdk again, and I see that you can create an LrExportSession with an array of photos. And then there's also a exportSession:doExportOnCurrentTask() - I wonder if I can create an export session, and then force the export myself...

            • 3. Re: Access to preview data?
              areohbee Level 5

              Yes, you can force an export - and this may be preferable in your case, since you can ensure it's up-to-date and control quality and format...

               

              But, to access previews you need a preview (UU)ID, the photo's UUID is not enough.

               

              Reminder: preview IDs are not accessible by plugins, except as passed by pre-Lightroom-startup script or the like (which means newly imported  photos will never be accessible without restarting).

               

              Also, if Adobe doesn't like us mucking with the previews, we may find the preview database locked in Lr4 - I hope not...

               

              If you are still interested in accessing previews, please PM me. I don't feel comfortable posting on this forum as its an undocumented, reverse-engineered, and *possibly* frowned upon thing to do...

               

              R

              • 4. Re: Access to preview data?
                ckhorne Level 1

                I may have been looking for the wrong thing, then - I need the latest and greatest jpg, generated using the current develop settings. I was thinking preview data would contain that, but I was also thinking that the export wasn't available. It sounds like the export route may be my best option.

                 

                Thanks for the info. I'm going to try this route before having to support undocumented features. But if I run into problems, I may PM you about your solution.