How to watermark photos with the filename?

I’d like to add the filename as a watermark to a large group of photos. Its there a way to automate this with a placeholder in PL9? Presume I still need to revert to another program. I don’t use LR anymore.

Thanks!

This has long been requested. You can vote for it and read more here:

yes, of course … .DOP files are text files - use some ai chatbot that will help you to write a [shell or whatever]script and plug WatermarkText = filename in .DOP files that you need … that simple

Hi @auser

Appreciate the suggestion but it’s not that simple.

A manually edited a .dop is not read by PL9 since the database is prioritized.
Also, the block of Watermark “code” is more than one line as it include the positioning and text size/color info too. This “code” must be within the Settings block in the .dop.

So to make this work, the user needs to either delete the database or create new copies of the image and a baseline .dop; run a script to edit the watermark text; then update PL9 to point to the new images. I can do basic scripting, but this is a bit beyond my current skills. Since this is less than 100 images and an infrequent need, I’ll look elsewhere.

Thank you

A manually edited a .dop is not read by PL9 since the database is prioritized.

I don’t use “database” for that exact reason … plus you can recreate the database from .DOP files it it comes to that ( again - not a rocket science )

Also, the block of Watermark “code” is more than one line as it include the positioning and text size/color info too.

but you need to fix just the text ( so one tag ) - PhotoLab will do the rest - you do not need to fix any other tags related to watermarks …

that is why I suggested to use some decent ai chatbot to help you with coding … naturally do backup first … as an additional benefit - you will gain a useful skill and experience manipulating DOP files … instead of looking “elsewhere” …

Perhaps I am missing something. It’s not a simple .dop coding issue as you suggest. I can easily to a cut/replace in the .dop files.

The original photo data and watermark “edits” are also in the database. The database appears primary, so does not check for external updates to the .dop. I don’t see an AI coding" method to force this database update. My way around this was to create new copies of the photo and .dop files outside of PL, edit the .dop, delete the old images (and hence their old .dop files, then re-introduce the photos to PL. This I can script too, but introduces new potential errors and time. For the 79 photos, it was faster for me to do it manually, then fiddle with a script to move the files. If I did this frequently, yes I would create a well structured script.

Appreciate the suggestion, but for me, this was more time consuming and risk prone than a manual copy/paste in the watermark field.

While an old request for this exists in the forum, I did write a support ticket to document the suggestion with DxO.

Don’t use the database. For example, I set the database location in PhotoLab to a RAM disk in the first place, and I only start PhotoLab from scripts that delete the database before each launch. This approach works very well for me.

Of course, there are many other ways to accomplish the task , even for those who value the DxO database and want to keep it intact like you yourself suggested here

With that said the matter was put to rest.

This works on a folder of files and modifies the .dops. It works for me but I suggest making copies of the .dops until you’re confident it works for you.

Using PhotoLab select necessary images and assign watermark text, I used dummy so all the dops show
WatermarkText = “dummy”,
Revise position, colour, size as required

Run a script so “dummy” is replaced by filename

With all images selected do
File/Sidecars/Import
which will update the watermark text for each

Example Powershell script, place it in the folder, right click and run:

$List = Get-ChildItem *.dop
$Oldtext = ‘dummy’

foreach ($ChildItem in $List){
$Newtext = $ChildItem.Basename

echo $Oldtext
echo $Newtext

(Get-Content $ChildItem) -replace $Oldtext, $Newtext | Set-Content $ChildItem

}

Good luck