Main Menu

Exclude Lightroom develop settings

Started by brettphoto, March 09, 2012, 12:13:22 AM

Previous topic - Next topic

brettphoto

Hi Bogdan,

I need to exclude the Lightroom develop settings when using the Import Metadata into Selected > JPG or TIF command. I am copying from my DNGs to my tif and jpeg copies, and since the develop data was already applied once when the raw file was exported, it can't be applied again with exiftool during this copy operation, or all the colors and tones go out of whack.

Thanks for your advice.

BogdanH

Hi,

I don't know what exactly LR is writting, but removing unwanted part/group of metadata should be quite simple. Select file(s) in GUI and choose Xmp view button. You will see many groups (written bold) there.
Let's say, there's
---- XMP-photoshop ----
..group you wish to remove.
In this case click on ExifTool direct button and enter the command:
-Xmp-photoshop:all=
..and press Enter key (make sure that desired files are selected before you hit Enter). You can remove more that one group at once, by entering i.e.:
-Xmp:photoshop:all= -Xmp-pdf:all=

Some groups are allready predefined if you choose menu Modify>Remove metadata.
I hope that answers your question.

Bogdan

Corrected (see next post).

Phil Harvey

A minor correction:  use -xmp-photoshop:all= to remove the group.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

brettphoto

Just to be clear, I don't want to remove the Lightroom (Photoshop) settings from the DNG, since I need them for Lightroom. I just want to exclude them from the metadata copy operation. Can you confirm?

Thanks

Phil Harvey

OK.  This isn't what you want then.

I don't know how the ExifToolGUI "Import Metadata" feature works, but on the command line you would add options like --xmp-photoshop:all to exclude groups from being copied.  You'll have to figure out what groups you want to exclude though.  You may also want to exclude XMP-crs.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

BogdanH

This can get confusing, because as it seems, we have two threads about the same thing here.
Here I have tried to explain how to copy metadata from DNG to TIF:
https://exiftool.org/forum/index.php/topic,3989.0.html
..I also mentioned, how to exclude metadata group (i.e. Makernotes) to be copied.

In this thread, it is said that TIF files were created with LR, where I assume metadata is allready inside TIF's (written by LR or copied with GUI) and that the question was, how to remove unwanted group of metadata inside resulting TIF's only.

Bogdan

brettphoto

Bogdan they are old tiffs and I have since changed all of the metadata in the dng source files. Now I need to copy the new metadata, but I cannot include the Lightroom develop settings. I will try out the various approaches you and Phil have suggested. It looks like it would be easiest to just use the command line.

Thanks,
Brett

brettphoto

Hi Phil, I tried

--xmp-photoshop:all and XMP-crs

And all of the Lightroom develop info still copies over. Any other suggestions? I did find reference to the CRS

"The XMP "crs" block contains all the information about Lightroom develop"

What is the correct syntax to exclude the crs?

My code

-TagsFromFile E:\Testphotos\RAW\%f.dng -All:All --Makernotes -r --xmp-photoshop:all --XMP-crs -ext jpg C:\Users\Brett\Pictures\jpgtest


Thanks

brettphoto

FYI the only way I've made this work is to copy the metadata over, then reset all and erase history in Lightroom (for the jpegs), then use the exiftool GUI to remove both the crs and Photoshop.

Phil Harvey

Use this command to look at the metadata in an image:

exiftool -g1 FILE

This will group the output by the family 1 group names.  Then use --GROUP:all to exclude a specific group from being copied.  For the XMP-crs group, use --xmp-crs:all.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

areohbee

Here's the roundabout way I transfer metadata excluding develop settings:


                savedXmpFile = LrPathUtils.addExtension( toXmpFile, "xmp" ) -- kinda tacky.
                call.ets:addArg( "-overwrite_original" )
                call.ets:addArg( "-tagsFromFile" )
                call.ets:addArg( toXmpFile )
                call.ets:addArg( "-xmp" )
                call.ets:addTarget( savedXmpFile )
                local s, m = call.ets:execWrite()
                if s then
                    assert( fso:existsAsFile( savedXmpFile ), "exiftool was unable to save xmp metadata" )
                else
                    app:error( "unable to save xmp - ^1", m )
                end


                    call.ets:addArg( "-overwrite_original" )
                    call.ets:addArg( '-all=' )
                    call.ets:addArg( '-tagsFromFile' )
                    call.ets:addArg( fromXmpFile )
                    -- call.ets:addArg( "-xmp" ) - can't do this here, or it brings the develop settings too, at least when xfr is raw -> jpg.
                    call.ets:addArg( "-all:all" )
                    call.ets:addArg( '--xmp-crs:all' )
                    call.ets:addTarget( toXmpFile )
                    local s, m = call.ets:execWrite()
                    if s then
                        app:logv( "xmp updated" )
                    else
                        app:error( "Unable to update xmp - ^1", m )
                    end
                    call.ets:addArg( "-overwrite_original" )
                    call.ets:addArg( '-tagsFromFile' )
                    call.ets:addArg( savedXmpFile )
                    --call.ets:addArg( "-xmp" )
                    call.ets:addArg( '-xmp-crs:all' )
                    call.ets:addTarget( toXmpFile )
                    local s, m = call.ets:execWrite()
                    if s then
                        app:logv( "xmp updated" )
                    elseif m then -- not updated with reason.
                        app:error( "Unable to update xmp - ^1", m )
                    end


Note: call.ets is an "exiftool session" (instance of exiftool loaded with -stay_open).
Note: addArg just writes to command file appending line feed, and addTarget is just a glorified addArg...
Note: I delete savedXmpFile upon completion.
Note: fromXmpFile and toXmpFile are xmp sidecar path and jpg image file path, or vice versa.

Explanation:

* Save all xmp metadata from target file.
* Gut the target, then transfer all tags from source to target, except dev settings in xmp-crs.
* Restore saved develop settings (xmp-crs).