Why can I not just delete the [M]aster copy and leave any other VCs (Virtual Copies) intact!?

PhotoLab has a very useful feature that allows the user to explore image editing options and referred to as ‘Virtual Copies’.

The original image is considered as the [M]aster and other copies as Virtual Copies, i.e. [1], [2] etc as shown here

Every VC has its own entry in the database just like the [M]aster.

For some time I have wondered what prevents the [M]aster being deleted and the other copies being left intact, i.e. isn’t the [M]aster just another “copy”

I believe that the answer is simply a coding issue, i.e. DxO could correct this “feature” tomorrow if they so chose and I set out to “verify” that theory in this post.

Creating copies:-

Initially after a VC has just been created it will contain the same data as the copy from which it was “cloned”, i.e. the first VC will initially start with the data and edits of the [M[aster but can then be changed independently. The next VC can be “cloned” from the [M]aster or VC[1] and then from [M], [1] and [2] and so on.

Deleting copies:-

But for many releases deleting the [M]aster automatically results in the loss of the [M]aster and all the VCs (and the image file on disk) and this has caught new users out from time to time. That was not how the feature originally worked but that is certainly how it works now and at least there is a warning!

image

So ‘Removing’ VC[2] results in the removal of just that entry from the database but ‘Removing’ the [M]aster results in the removal of [M] and all the associated VCs from the database and the image file from disk.

There are other issues on DxPL(Win) because VCs cannot be “named” (identified) while I believe they can be named on the Mac. So deleting a VC will simply cause all the VCs to “shuffle” down and it is up to the user to remember why a particular VC was created and what edits it contains on the Windows version.

As I stated above I believe that the answer is simply a coding issue, i.e. DxO could correct this “feature” which I have classified as a “bug” tomorrow if they so chose.

“Hacking” the database:-

To test my “theory” I deleted the [M]aster image record from the database, restarted DxPL and this is what I got

Before:-

After (hacking the database):-

To change the way that it works DxO would need to ask the user when they go to ‘Remove’ an image entry that has additional VCs, i.e. a [M]aster entry, whether they want to ‘Remove’ just the [M]aster entry (new “feature”) or the [M]aster and all VCs (the current “feature”).

The removal of the [M]aster entry in the database would then be identical to what happens now with a VC, no more and no less.

The slightly more technical description will be added in another post.

A slightly more technical description.

For the example above the database looks like this before I deleted the [M]aster (first) entry in the database.

All copies get an entry in the ‘Items’ Table’ and also in the ‘Metadatas’ and ‘Iptc’ Tables.

All copies point to the ‘Sources’ table and effectively “share” a single ‘Sources’ entry which then points to the ‘Folders’ table which holds the details of the directory and drive in which the image file is located.

I then deleted the first ‘Items’ entry, i.e. the one associated with the original [M]aster entry and restarted DxPL which continued as if nothing had happened and I got the results as shown in the first post.

I failed to delete the associated entries in ‘Metadata’ and ‘Iptc’ so I have left some “garbage” in the database and keywords and 'Projects need to be handled but the coding is all in DxPL and used every time a VC is deleted.

So treating the deletion of the[M]aster entry in the same way as the deletion of a VC is handled when more than 1 copy exists should work, I believe.

short answer:

Copy the content from the VC that you want to keep
grafik

and paste it over the Master
grafik

.
Then you can delete whatever you don’t need anymore.

@Wolfgang Nice try shame you forgot the keywords and Iptc.

On a Mac, the deletion dialog is very different for a master…

… and a VC…

No matter how it is implemented, this seems to make it abundantly clear what will happen.


@Wolfgang Plus hopefully this might help new users avoid issues like losing their edits and the image as well.

@Wolfgang Because of the PhotoLab auto import mechanism it is not possible to have an image in a directory that has been “discovered” by DxPL that is on disk and not included in the database, i.e. when the [M]aster is deleted from the database then the actual image “must be deleted” to maintain the PhotoLab “equilibrium”.

I once wrote a post that I did not publish in the forum for modification to PhotoLab that included a system of user triggered importation and user controlled rendering, i.e. PhotoLab could be used to browse image directories without instantly triggering importation and rendering.

I managed to preserve the text I wrote but have mislaid the images (screen mock ups) that went with the text!?

I believe such a scheme would help save on system resources and greatly speed up ad hoc image processing with PhotoLab but the chance of any such initiative being adopted by DxO are non existent.

@Joanna I must go and fit some rack bolts to ensure we comply with house insurance requirements I will translate and review your post later.

I don’t rely on keywords …

Tried my “edit .dop-file” approach and this is how it went:

  1. Select image and create 5 virtual copies
  2. Renamed the Master with suffix _DUMP
  3. Renamed Virtual copies with suffix KEEP
  4. Saved .dop sidecar, then selected an empty folder
  5. Quit DPL and delete database (not sure if it is strictly necessary)
  6. Edited the .dop sidecar and removed the section for the Master
  7. Saved the sidecar and opened DPL again
  8. Selected the original folder and got
    a new master and 4 virtual copies, all of which had the suffix _DUMP
  9. Can’t say, which VC turned into the master, but if you like, you can test for that numbering the VCs while renaming.

Notes:

  • My DPL is almost always set to not automatically import/export/sync sidecar files.
  • Notice the clean sidecar text as shown with BBEdit. Expanded: one VC and the master
  • Notice that the position of the entry for the master is nor top nor bottom
  • All done on Mac, Win mileage might vary :wink:

Why isn’t it easier?

  • Because DxO re-designed it that way - based on user feature request. Originally, the master had no special properties and could be deleted without negative consequences. Looking back, the original implementation was harder to understand but easier to handle, it wasn’t smart to vote for that feature request which looked good and promising then :person_shrugging:

Oh, I’m sorry. I forgot the average Brit could only speak one language :rofl: :wink:

Delete Master…

Delete VC…

1 Like

Don’t forget us Aussies!

Ah yes, Australian - the language where every sentence sounds like a question :stuck_out_tongue_winking_eye:

1 Like

@Joanna Merci or should that be Mercy!

I am sorry but I stopped learning French after my O levels, I was 15 at the time so that would be about 62 years ago.

You obviously have never experienced hearing a California valley girl accent from the 1980s-1990s. The valley referred to is the San Fernando Valley. The people who spoke that way very often came from very privileged backgrounds. The accent is generally demeaned in popular culture.

Everything out of their mouths sounded like a question. Valleyspeak has a linguistic affectation called uptalk where the pitch of the voice rises towards the end of declaritive sentences and makes them sound more like questions.

Mark

It is strange that we rely on a database that doesn´t support cascading updates and deletes in 2024. No wonder why there are orphaned data garbage in our databases.

I think I’ve posted this before but it’s worth repeating…

  • If you speak three or more languages, you are multilingual
  • If you speak two languages, you are bilingual
  • If you only speak one language, you are British
1 Like

And if you speak only one language – and poorly – you are probably US American! The incredible amount of poor grammar everywhere in this country, even in commercials where the communications “experts” should know better, probably has most English language teachers questioning their choice of profession!

2 Likes

…and the last syllable of the last word in every sentence is unnaturally drawn out.

It’s gittin’ pretty common nowadays, everywhere.

2 Likes

@stuck That might need to be modified to English in order to not insult a sizable chunk of the Welsh, some Scots and some Northern Irish!

@platypus I think you published something like your post above before and I am sorry if I appeared to ignore it I didn’t but I did, i.e. I ran some tests of my own which had differing results between the tests I ran and then reran and because I could not come up with a definitive strategy I failed to publish, sorry for apparently ignoring you previous post!

So I will try to document what happened to my tests here but must emphasise that I have run into yet more problems when I attempted to repeat my tests for this post.

Unpublished Post in response to forum.dxo.com/t/kludge-how-to-make-a-master-of-a-vc-on-mac/38581:-

I have always felt that DxO could have provided coding to completely prevent the “Unwanted Virtual Copy” scenario!

I also believe they have changed the product somewhere along the way so that the product does not automatically assign a new UUID to an image when a DOP is present unless the one being presented is a UUID already in use (I would expect this to be extremely rare but not impossible).

This makes “round-tripping” an image with edits, e.g. from laptop to the desktop and then back to the laptop, less likely to result in “unwanted VCs” but they still crop up from time to time!

However, a simple test in DxPL with a request to the user to make a choice instead of automatically creating a VC, could avoid the current fallout from the problem.

With respect to the old scheme that @platypus remembers (as described in this topic and the reasons behind it in your post above) I am not sure that will ever return, so simplifying a collection of edits by deleting is only going to work easily for the VCs and the [M]aster is always going to remain intact or be completely deleted from the database and disk.!

Any attempt at “external” adjustment would lack the main feature of being able to actually see the images rendered which is essential to aid the user to make the decision as to what is going and what is to remain.

The best scheme that I can suggest is to leave the [M]aster intact and create VCs for editing and creating alternatives. When the time comes to “thin” the edits down then copy the best corrections to the [M]aster and delete all or most of the VCs.

To swap corrections between VC’s or between a VC and the [M]aster an additional VC is needed to provide the required “swing space”, i.e. copy edits, Iptc and keywords from A to “Swing” VC, copy edits etc. from B to A and then copy edits etc. from “Swing” to B and delete “Swing” when no longer required…

Because both your proposed technique and @platypus’s technique are excruciatingly boring and tedious as is the process I have outlined below, when executed manually.

However, the process can be automated with the help of coding and that makes it possible to run through an entire directory of hundreds or thousands of images as and when required, e.g. when an entire directory becomes full on “unwanted VCs”!

@platypus Why bother to destroy the database!?

Here is a test directory complete with [M]aster and VC[1]

and also complete with projects

The way that the data is arranged in the DOP is as follows

All the metadata and edit data are to be found after the “Album” heading in the DOP, that includes all the metadata, so having ensured that DxPL is not using the directory to be adjusted and having secured a copy of the database before potentially “trashing” it by accident, it is possible to fiddle with the DOP before it is then re-discovered in DxPL.

Intentionally trashing the database would destroy any projects and on the Mac, advanced history as well. If it is possible to avoid any unnecessary destruction of the database or DOPs etc. then I believe that to be the better course of action.

I did the following with DxPL(Win) running

  1. Extract the [M]aster details

  2. Extract the VC[1] details

  3. Create a new DOP containing the Header, VC[1] details,[ M]aster details, + the Trailer

  4. Swop the UUID between the, now re-located, [M]aster and VC[1} entries so that the (new) [M]aster contains the VC[1] data but with the [M]aster UUID and VC[1] contains the old [M]aster data but with the UUID of the old VC[1]

  5. Adjust the 'Modification time" up by 1 (I need to verify that this really triggers DxPL to reload the DOP when automatic DOP loading is set in the ‘Preferences’).

Rediscover the directory and hope for miracles.
image

Via the ‘Projects’

with the “BaseLine” directory still showing the original layout

image

By retaining both copies it is possible to review the outcome and easy to delete [1] which was originally the [M]aster entry or not!?

Now all I need to do is write the PureBasic program to automate the function., including securing the database and the DOPs before starting the switch for all images that have two entries in the DOP!

Update, with an update to that:-

However, during that test I managed to hang DxPL but on restart got the swap that I expected and have achieved in the past.

I then tried to repeat the tests and go further but made the mistake of reversing the images because I felt it looked more appropriate to have the muted image as the [M]aster and the brighter image as VC[1] but that just made things even more complicated,

I also created additional image copies, i.e. copy the image with a new name and take one of the VC entries to create its DOP by adding the header and the trailer.

That appeared to work at the time, however I failed to repeat the results I got with the DOP swop and gave up.

Update to the update:-

I tried again with the example I used at the beginning of this post, with the ‘Ratings’ altered slightly so they go from 0 for the [M]aster to 4 for VC[4].

I then created 5 images from the original one image and 5 (hand) manufactured DOPs and got

The edits look to be intact but the ‘Ratings’ etc. are there in the DOPs but not in DxPL after discovery, even after clearing the database and locating only that directory!?

So that will remain as is for now while I get on with the program to do the DOP manipulation automatically (it is way to prone to error doing it manually) to see if I can discover what I have done wrong or which fields are causing the metadata to be ignored, i.e. there isn’t much to cause problems other than the date fields (or my formatting)!?

Sidecar = {
Date = "2024-08-11T07:15:39.8424695Z",
Software = "DxO PhotoLab 7.8",
Source = {
CafId = "C61004c",
Items = {
{
Albums = "",
CreationDate = "2024-08-11T07:14:01.5966400Z",
IPTC = {
contentHeadline = "[M]",
}
,
Keywords = {
}
,
ColorLabel = "Red",
ModificationDate = "2024-08-11T07:15:39.8384705Z",
Name = "P1-0.RW2",
Orientation = 1,
OutputItems = {
}
,
ProcessingStatus = 1,
Rating = 0,
Settings = {

I even changed the image name in the DOP, I have previously believed the field is basically “ignored” by DxPL(Win) but without any success.

In order to prevent conflicts…and to make the edits work. The annoying thing about editing the sidecar is the master’s bunch of edit entries which can be on any position from first to last.

The distinction between master and vc seems to be in the database rather than in the sidecars. Haven’t bothered to search for it, even though rhe db on Mac looks rather clean and simple in comparison to what I remember from checking dbs of Mac vs. Win.

Any hack, be it with editing a sidecar or db is a workaround at best. Any softwareupdate could render all of it useless, e.g. if sidecars were binary or signed.

I have a very simple technique for dealing with accidentally deleting a master instead of a VC - I just never edit the master, creating a VC before doing anything else.