Binding preview of an image

New Here ,
Apr 18, 2022 Apr 18, 2022

Copy link to clipboard

Copied

Hi,
We want to create a logo editor which supports our logo settings flow. Is it possible through Lightroom SDK to create an editor that shows how the logo would appear? We want to have an editor similar to the 'Watermark editor' built in on LrC, that shows how the chosen Watermark would appear based on given settings. 
Is there an option to view and bing image properties according to settings?

TOPICS
SDK

Views

33

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 18, 2022 Apr 18, 2022

Copy link to clipboard

Copied

LATEST

The only way I know of that a plugin could manipulate watermarks is by creating a watermark preset. These presets are stored in the Watermarks subfolder of the LR settings folder, e.g.

 

/Users/john/Library/Application Support/Adobe/Lightroom/Watermarks/My watermark.lrtemplate

 

The .lrtemplate files are Lua-syntax files whose contents should be easy to figure out. I haven't tested it, but I'm assuming that watermark presets are like any other kind of LR preset -- they are read once when LR starts, so if a plugin adds or changes a preset, the user will have to restart LR to force it to read the new .lrtemplate file.

 

A plugin can preview a watermark preset using LrExportSession to export a sample photo with export settings that include the watermark preset.

 

The plugin can display a photo that's not in the catalog using the LrView "picture" control. It's not well-documented, but a plugin can set the control's "value" property to be a string that's the full path of the photo to be displayed. It can also set it to an LrView.bind binding, letting the plugin change the picture on the fly, e.g. 

 

f:picture {value = LrView.bind "path", width = 400}

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines