My answer is based on ".XMP" files (sidecar files) and consists of 2 parts. I explain two potential solutions in the first part and explain the parameters to use in the second one.
Two solutions using XMP files
This part explains 2 potential solutions, using :
- RAW and 2 XMP files
- TIFF and 1 XMP file
1) Using RAW and 2 XMPs
In theory, one solution may be to have 2 XMP files for each picture :
XMP "A" for the original picture (RAW -> image "A"). It should contain all the develop settings of your original picture. Once you are out of Lightroom, all editing software would have to make modification through this XMP file. For Photoshop and others, it mean that all "destructive" editions will have to overwrite the "original" picture (so the original at this point can't be RAW, it must be TIFF-like as you can't "photoshop" a RAW).
XMP "B" for the thumbnail associated to the original (image "A" -> image "B"). It should only contain information about the transformation from original to thumbnail (only cropping I guess).
With this setting, you could write a program to watch for change in the RAW original picture (unlikely to occur) or in the XMP "A" file. You probably need a database with the date of the last known change of the RAW and of the XMP "A". If such a change it's detected, then you use an Image development software to develop your original RAW with the setting of XMP "A" + XMP "B" to get your thumbnail.
Problems :
- I don't know any bash development software capable of using the proprietary XMP fields used by Lightroom (and its proprietary editing software). You can't use Lightroom development tools like any externally called program, so I guess you will need :
- a Lightroom plugin or some kind of Photoshop batch processing to get your developed original image (RAW -> image "A")
- a more basic tool to transform this image to a thumbnail (image "A" -> image "B").
- If you crop/rotate/resize your original image, you WILL have to change XMP "B".
2) Using TIFF and 1 XMP
As you are stuck with TIFF when using Photoshop, you can keep only the XMP "B" to get your thumbnail.
Use any way you want to get TIFF from your RAW and then make all the transformations you want to the TIFF (this TIFF is the result of RAW + XMP "A" in the case of a non destructive transformation). Now, you just have to look for TIFF changes. When one is detected, launch a third party program to automatically create a thumbnail based on a stored transformation. The transformation parameters (cropping,...) could be stored in the XMP format (=XMP "B") or in any compatible format if it is easier for the third party image processing program. Using ImageMagick (version >=v7), something like convert image_A.jpg -profile xmp:image_A2B.xmp image_B.jpg
should do the trick (untested).
About .XMP
Cropping and rotating parameters of Lightroom XMP file are saved in the following format (those lines are added to the XMP file when cropping/rotating an image) :
crs:CropTop="0.3"
crs:CropLeft="0.4"
crs:CropBottom="0.9"
crs:CropRight="0.8"
crs:CropAngle="0"
crs:CropConstrainToWarp="0"
crs:HasCrop="True"
crs:AlreadyApplied="False"
The 4 first fields (crs:CropTop, crs:CropLeft, crs:CropBottom and crs:CropRight) are expressed in a fraction of the original image size, given from the top-left corner :
The field "crs:CropAngle" defined the rotation but it shouldn't concern you.
I Hope this help :)