Copy link to clipboard
Copied
Is there a way to access and use the smart previews or the regular previews that Lightroom creates?
Best would be to use the previews in php. But for a start any other programming language e.g. java would also be ok.
Reason why I am asking is, I want to have a WebInterface for Lightroom in my LAN (not Internet)
For now I create thumbnails and images myself using regular export function of lightroom.
But this is extra work to do.
Thank you
found it, lrprev files are just text files that have basic information and several jpg representations in different resolutions of the jpg and you can read the string of the jpg information and use it for presenting the jpg.
Copy link to clipboard
Copied
See the method photo:requestJpegThumbnail(). Also, search this forum and the official Adobe feedback forum for that method, since some developers reported having issues with how it works (as of a couple years ago).
Copy link to clipboard
Copied
Thank you very much.
I was looking for some way to decode the files and use it directly for my webgallery or webinterface.
I assume that the method you are mentioning is part of lua. Maybe my post is not in the right section and should not be part of lightroom sdk.
Copy link to clipboard
Copied
One approach is to write a Lua script that uses photo:requestJpegThumbnail() to extract the previews in JPEG format and write the previews to a file or send them over the network.
Another approach is to use directly examine the catalog database and the previews database to extract the preview for each desired photo. Both databases are SQLite databases, and since they are undocumented and direct access is unsupported by Adobe, building a system on that is likely to be more fragile than one built on a Lua script. There are a few plugins around that take this approach, e.g. Jeffrey Friedl's Blog » Jeffrey’s “Extract Cached Image Previews” Lightroom Plugin and LRViewer.
Copy link to clipboard
Copied
found it, lrprev files are just text files that have basic information and several jpg representations in different resolutions of the jpg and you can read the string of the jpg information and use it for presenting the jpg.
Copy link to clipboard
Copied
Hello, Jhonrellis!
Please, tell me if there is any way using LR SDK to get active catalogs smart previews linked to its photos (from selected catalog).
I see photo:buildSmartPreview() but if it is some getSmartPreview() or some other way? I need to upload all photos from active catalog and all smart previews from this catalog to the server.
Thank you!
Copy link to clipboard
Copied
Here's how to get the path and size of a photo's smart preview (see the SDK documentation for LrPhoto getRawMetadata):
Copy link to clipboard
Copied
Thank you very-very much!
Copy link to clipboard
Copied
Hello, tell me please, what tool did you use in the screenshot you provide in the last post?
Copy link to clipboard
Copied
It's from my Lightroom debugging toolkit: Debugging Toolkit for Lightroom SDK