![]() |
San Francisco, California | |||
| USA | ||||
Preview Exporter - Lightroom Plugin
Quickly export (or publish) Lightroom preview images, instead of re-rendering jpegs from scratch. Also supports recovering previews for missing or corrupt photos.
Featuring:
Quick Links (intra-page)
Background Information
Screenshots
How to Use
Preview Exporter FAQ (Frequently Asked Questions)
Revision History
Download
See the readme file after downloading for usage and other notes.
Export Dialog Box

Note: Preview Exporter is "checked" in Post-Process Actions section.
Note2: Although 'Write Keywords as Lightroom Hierarchy' is not disabled, its not supported by Preview Exporter (see below for other export setting considerations).
Plugin Manager Configuration
You *must* visit the plugin manager to specify locations for dependent programs, before Preview Exporter will work.
I initially wrote this as a test case to exercise the new preview image api written for the elare plugin framework, but I soon realized how handy it can be when a quicker export is desirable.
| Preview | For the purpose of this document, it means a jpeg image extracted from the previews Lightroom uses to support image display in the library and develop modules. |
| Preview Cache | Ambiguous term that is hopefully clear from context: May mean the Lightroom previews in the preview folder in the same folder as your catalog, but may also mean the versions used to support plugins which may also be cached. |
| Preview Pyramid (aka Preview Stack) |
Lightroom optimizes preview generation by creating smaller versions of previews that are exactly half the dimensions of their larger brethren. So, whenever a large preview is created, its smaller brethren are also created, very quickly. |
| Level | A size code from 1-7 that defines a ballpark preview image size. |
| Preview Size | Whenever Lightroom creates previews, it creates them at the largest size needed given the context (or user-initiated request), then creates the smaller versions while its at it. This is why the the sizes vary so much. For example, a cropped image may use level 6 for its largest rendering and not have a level 7 rendering, but an uncropped image may use level 7 for its largest rendering, then have a different size for its level 6 rendering... |
| ImageMagick | Command-line program that does high-quality yet fast image processing functions known as "mogrifications". In versions 1-2, Image Magic was required for all functions. |
| sqlite3 | Command-line program for accessing the preview database. Built in for both Windows and Mac versions, or you can configure your own. |
| exiftool | Command-line program for transferring metadata from Lightroom to exported image. @v3.0 its responsibilities have been expanded, to support limited functionality without Image Magick. |
| Post-Process Action | Synonymous with export filter. Lightroom exports are passed from one post-process action to the other until finally being exported via the chosen export service. Note: In the case of PreviewExporter, Lightroom does not render any exports, so handling of things like output sharpening and resizing are handled entirely by PreviewExporter. |
| Export Filter | The "internal" name for a post-process action. |
| Orientation | The combination of vertical/horizontal flip-flopping and rotation. In Lightroom, this is stored in the database. After export, orientation may be saved as metadata... Note: some viewers respect orientation metadata, some don't. |
- Install (see readme file in downloaded zip file)
- Configure in plugin manager
- See quick tips on file menu
- Insert as Post-Process Action in Export Dialog Box.
See elare plugin framework for common settings.
Additional Settings and Controls
You *must* specify locations for dependent programs, before Preview Exporter will work.
You *must* specify locations for dependent programs, before Preview Exporter will work.
You *must* specify locations for dependent programs, before Preview Exporter will work.
| sqlite3 executable | Path to downloaded sqlite3 executable file. Leave blank for built-in version (included for Windows & Mac both). Or download and install a preferred version from http://www.sqlite.org/download.html. |
| Image Magick | Path to mogrify executable file. For full functionality, both Windows and Mac users must configure this. However @v3.0, its no longer required for recovering previews, nor for basic exports that can get by with icc-profile assignment. For icc-profile conversion and some other export options, mogrify is required. Windows users: Any version you install from http://www.imagemagick.org/script/binary-releases.php#windows should work fine. And, the path to the mogrify.exe file is what you want to have in this field. For example: C:\Program Files\ImageMagick-6.7.3-Q16\mogrify.exe Mac users: See installation instructions at http://www.imagemagick.org/script/binary-releases.php#unix Look for 'Mac OS X Binary Release'. Notes: The recommended method of installation using MacPorts is "guaranteed" to build a proper executable for your system, but will probably take a very long time, and download/compile lots of stuff. Lion users may opt for the new binary in tar.gz format, but you must follow the installation instructions carefully. If you are having trouble installing ImageMagick/mogrify, consider trying to get by with just exif-tool, if you don't need full functionality. The path to the executable 'mogrify' file is what you want to have in this field, for example: /bin/mogrify |
| exiftool executable | Path to exiftool executable file. Windows users can leave blank for built-in version. Mac users can get from http://www.sno.phy.queensu.ca/~phil/exiftool/install.html#OSX Follow the instructions for installation. The path to the exiftool executable file is what you want in this field, for example: /bin/exiftool Note: @v3.0, Preview Exporter may operate in a limited capacity without exiftool (as long as mogrify is configured), however that is considered a non-supported setup - it is highly recommended to install and configure exiftool, so preview exporter has it when needed... |
| Recover Previews | Select photos whose files are missing or corrupt, then click this button. Largest available preview will be fetched from Lightroom's preview cache and stacked on top. Feel free to unstack or rename afterward... Note: its not a requirement that photos be missing or have a problem, but there isn't much point otherwise, since if the photo is *not* missing or corrupt, you can just export the photo to same folder and add to catalog instead. |
Because of how PreviewExporter works (bypassing Lightroom's normal export rendering engine) only some of the export dialog box options are supported by PreviewExporter:
File Settings
---------------
- Format must be set to 'JPEG'
- To re-encode the jpeg with a different quality choose a setting between 1 and 99
(if set to 0 or 100, jpeg will not be re-encoded)
- Print resolution
does not matter.
- If resizing is desired, make sure type is 'Width & Height' and units are 'pixels' (will use ImageMagick's mogrify command to resize).
- If 'ICC Profile' is set to 'Convert', then preview will be converted to 'Color Space' as long as its sRGB or AdobeRGB (1998) - requires Image Magick mogrify. Other settings will result in export errors. If 'ICC Profile' is set to 'Assign' or 'Ignore' then 'Color Space' will be ignored. If 'Assign', the preview will have a correct profile assigned (requires exiftool or mogrify), it just won't be the one specified by 'Color Space'. In the latter case, no icc profile will be assigned, so the color will probably be "off" for some photos.
Output Sharpening
----------------------
- PreviewExporter supports output sharpening via ImageMagick's mogrify (-sharpen) command. Media-type is ignored - its optimized for screen.
Metadata
-----------
- Although, "Minimize Embedded Metadata" is supported, "Write Keywords as Lightroom Hierarchy" is not supported.
-
Click 'Edit Advanced Settings' to configure metadata to be transferred. Note: I was unable to figure out how to transfer everything, but I got most stuff. If you figure out the correct exiftool tags to use for stuff not supported out-of-the-box, do tell me.
Watermarking
----------------
- Not directly supported, but you can use additional mogrification to watermark, if you know how.
Preview Exporter Section
-----------------------------
| Minimum Size | Minimum acceptable size for exported previews. If no preview available at this size or greater, the preview will not be exported. The photo may still be rendered & exported, depending on 're-render photo when preview is unavailable' setting. |
| Preferred Size | A preview of this size will be obtained if it is available, otherwise a smaller preview will be obtained if possible (depending on minimum size setting). |
| Additional mogrification | Since PreviewExporter uses ImageMagick for sharpening and resizing, and other things, you can piggy back your own mogrification via additional parameters to mogrify (plugin manager has link to reference documentation). Hints: (do not include apostrohes) For png, include: '-format png -define png:bit-depth=8' |
| ICC Profile | Some cached previews use sRGB colorspace, some use AdobeRGB. If you don't assign an ICC profile to AdobeRGB images, they may not look right in viewers that interpret the absence of a profile to mean sRGB. If you just want fastest export and perfect color is not paramount, e.g. small thumbnails (which are usually sRGB anyway), then uncheck this box. I keep it checked for normal use since proper color is generally worth waiting for, but uncheck it during testing... See "Export Dialog Box" section above for a description of 'Assign' vs. 'Convert' vs. 'Ignore'. |
| Orient Image Data | Check this box to have mogrifier transpose image data for correct orientation. Note: there is also an advanced setting to have orientation saved as metadata. Usually its best to correct using one method or the other, but not both (orienting image data and leaving orientation metadata out is the most reliable, but not the fastest). |
| Re-render photo if preview unavailable. | If checked and preview does not exist, preview-exporter will simply render as it would if preview-exporter were not in the loop (using Lightroom's built-in native rendering engine). Generally this is a good thing, since the objective is generally to get the photos out as fast as possible, but without coming up short. But if you've got additional mogrification you're depending on or just want speed even if potentially missing photos, then you may want to uncheck this... |
These FAQs come partly from users, and partly from my imagination. Please let me know if there are errors or omissions in this FAQ - thanks.
NOTE: The following Q&A's assume that the plugin is working as I expect... If, after your best effort, still "no go", please let me know.
Question: Why would I ever need or want such a thing as Preview Exporter?
Answer: If you don't mind waiting for Lightroom to render all your images when you export, then Preview Exporter is not for you. However, if sometimes you would like to be able to export jpegs faster, then Preview Exporter may be just what the doctor ordered. It can also recover a jpeg format version of any photo when the source file is missing, as long as a preview image is still available in the Lightroom preview cache (it is available if you can view the image in Library "loupe" view).
Question: Why do I get errors?
Answer: First check that you've downloaded dependent executables and specified their locations in plugin manager.
Question: Why do I have problems?
Answer: First check that you've downloaded and installed the most recent versions of dependent executables and specified their locations in plugin manager. Case study - I just now fixed a problem I was having by downloading the latest ImageMagick. Problem was with metadata when fixing orientation of portrait photo when metadata was not minimized - Lightroom had irreconcilable metadata conflict and would no longer update metadata - fixed by latest mogrifier.
Question: How are images exported so fast?
Answer: High quality jpegs are already rendered at the ready for Lightroom to use for thumbnail and loupe display (just sitting there in the preview "cache"). Preview Exporter just "borrows" them for exporting. When doing exports without preview-exporter, Lightroom re-renders each image from scratch, which can take several seconds per image.
Question: Why are exports slower when transferring metadata and such stuff?
Answer: Unlike Lightroom, preview-exporter uses exiftool to transfer metadata, and may also execute image-magick's mogrify (or instead). Although @v2.0, exiftool is no longer re-loaded for each exported photo, mogrify still is, and anyway, executing one or both of those takes time...
Question: Can I export in formats other than jpeg? like png or tif...
Answer: Yes, but you have to use 'Additional mogrification' field (see documentation for said field above).
Question: Can I export previews for video?
Answer: Yeah, but I'm not sure what value there is in it.
Question: Can I export previews for virtual copies.
Answer: Yep, but if you've recovered and renamed the original master you may not need to. However if you can't recover a preview for the master, a virtual copy preview may be your only hope.
Question: Why do thumbnails of exported previews look wonky sometimes in Windows?
Answer: Depends on the flavor of wonkiness:
If thumbnail looks corrupt - I don't know what causes this - I assume there is a conflict between Windows thumbnail generator and preview exporter. The file is *NOT* corrupt (in my case) - if you make a copy using windows explorer, the copy (same binary contents exactly), the thumbnail will be OK (or else its a different problem than what I'm talking about).
If the orientation is incorrect - its probably a metadata configuration issue - Windows folder viewer does not respect the orientation metadata for rotation that is used by PreviewExporter. Mac does, and ACDSee does, and Lightroom does...
Question: Any other hot tips I should know about?
Answer: Yes:
Question: What are the limitations of Preview Exporter and what are your plans for the future?
Answer:
(reverse chronological order)
- Reworked so ImageMagick is optional for preview recovery and basic export operation. Note: it is still required for icc-profile conversion, but not icc-profile assignment.
- Also allows recovery of previews for virtual copies without overwriting recovered preview for real/master copy.
###1 not tested on Mac yet, but may still work (let me know if you try it).
- Fixed bug recovering previews from 8-bit greyscale images.
- Added option to export any format like png or tif (but you have to use mogrify param, see tips above).
- Fixed problem with option to use Lightroom to render non-raw (rgb) photos with some incompatible export services, like TreeSync-Publisher (not yet released).
- Added option to only use preview extraction for raws. Unless rgb files have been heavily edited in Lightroom, Lightroom rendered rgb export is faster than preview extraction. Preview extraction is still much faster for raws though :-)
- Other minor performance optimizations.
- Other minor bug fixes and enhancements.
- Added an independent cancelable progress scope to upper left corner of Lightroom, so preview exporter's post-process action can be canceled (no way found to have it canceled along with main export).
- Corrected a potential error handling bug, and simplified the default presets.
(There were also some minor "under-the-hood"/infrastructure changes that should have no practical impact)
- Much improved performance: Instead of loading exiftool for each file being exported, only loads it once for the duration of the export. The code to do this is more complex, but seems to be working well - please let me know if any problems.
- Updated built-in exiftool.exe (Windows only) to v8.70.
- Improved performance - the base part of the export is significantly faster, although it still takes the same amount of additional time to transfer metadata, assign icc profile, orient...
- Fixed potential problem for temp file to be left behind when errors occur.
- Fixed bug: exported jpegs were missing last two bytes (FF,D9). This was causing less problems than one might expect, but more than zero. Better now... :-)
- Export will now succeed despite problems with original source photo format.
- sqlite3 executable for Mac included with plugin.
- Added feature to recover missing or corrupt photos from the preview cache.
- Fixed bug in obtaining proper colorspaces from the preview database.
- Added default presets.
- Misc fixes & improvements, perhaps most notably: added option to convert icc profile (previously only supported "assign")
- Initial release. ###1 not tested on Mac yet, but may still work (let me know if you try it).
acceptance of Download Terms & Conditions will be required
Preview Exporter 3.0 (beta) - Latest & greatest: this is the one to download.
Preview Exporter 2.3.1 - for fallback in case latest has a problem, in which case please tell me.
| Static content updated 2011-10-05 | Copyright 2007 - robcole.com - all rights reserved. | Dynamic content updated 04:10:23 PM |