lapstack

Lightroom Classic

lapstack.lrplugin sends the frames of a focus stack out of the catalog to the lapstack command-line tool and brings the stacked image back in, stacked above the first frame. It is the round trip Helicon Focus and Zerene Stacker offer.

Note

The plugin is a zip in every release and the folder lightroom/lapstack.lrplugin in the source repository. It needs the command-line tool from the download page.

Requirements: Lightroom Classic 6 or later, and the lapstack command-line tool installed. The plugin does not contain the engine; it drives the binary.

Installing

  1. Copy the lapstack.lrplugin folder somewhere permanent — Lightroom reads it in place.
  2. File › Plug-in Manager › Add, and choose that folder.
  3. In the plugin's section of the Plug-in Manager, set the path to the lapstack executable with Browse…, and set the stacking settings.

Settings

All of these live in the Plug-in Manager's section, and the same rows appear inside the Export dialog.

SettingNotes
lapstack pathThe executable. Required
Output formatSixteen-bit TIFF, sixteen-bit PNG, or a linear DNG. A DNG output wants the frames handed over as the originals — the raws as shot
Output nameA template. {first} is the first frame's name, {n} the frame count. Default {first}_stacked
AlignmentOn or off, with --align-coarsen
Halo controlThe --halo-control value
Weighted averageAlso write the WAV image
Depth mapAlso write the depth map
CUDAUse --gpu / --gpu-align (needs a build with the feature)
Extra optionsA free line appended to the command verbatim — --interpolation lanczos3 --stereo 3, say
Keep the rendered framesCopy the rendered frames next to the output instead of discarding them

Two ways to run it

Both doors run the same thing.

Library › Plug-in Extras › Stack with lapstack

Select the frames of one stack — in order; sort the grid by capture time — and choose the menu item. No dialog opens.

The frames are rendered with the Plug-in Manager's settings (a sixteen-bit TIFF in the chosen color space, or the originals, which is what a DNG output wants) into a temporary folder, lapstack runs over them in the order of the selection, and the result is imported and selected, stacked above the first frame.

File › Export, Export To: lapstack

The Export dialog, with Lightroom's own File Settings, Image Sizing, Output Sharpening and Metadata sections, plus the plugin's own section carrying the same lapstack settings. The Location and Naming sections are hidden, because Lightroom renders into a temporary folder it removes afterward.

Choose Original in File Settings to hand over the raws as shot; choose sixteen-bit TIFF otherwise.

The settings are saved in the export preset, so different subjects can have different presets. Closing the dialog with Export also makes those settings the menu item's.

Where the result goes

Next to the first frame, as <first>_stacked.<ext>, with lapstack's log beside it as <stem>.lapstack.log. A failure shows the log's tail.

A result Lightroom will not import — an unsupported format produced by something in the extra options — is left on disk and reported rather than silently lost.

One selection is one stack

The plugin treats the selection as a single stack. To stack several at once, put --split in the extra options and use the output templates to number the results.

The run cannot be interrupted once lapstack has started — Lightroom's LrTasks.execute blocks its task. The progress bar's cancel takes effect before the run and after it.

Platform notes

On Windows the command line is wrapped in one extra pair of double quotes, because LrTasks.execute hands it to cmd.exe, which strips the outermost pair — a long-known quirk of the SDK. On macOS every argument is single-quoted for sh.

Warning

The plugin was written against the Lightroom SDK 6.0 reference and its sources parse under Lua 5.1 (Lightroom's), but it has not yet been exercised inside Lightroom. The export-settings keys the menu item uses — LR_format, LR_export_bitDepth, LR_export_colorSpace, LR_export_destinationPathPrefix and the rest — are the ones published plugins use, but whether Lightroom accepts a lapstack-written linear DNG on addPhoto is untested. If it refuses, the plugin reports that the file was written and leaves it in place.

Please report what you find.

Source: sites/lapstack/content/docs/lightroom.md