How to Auto-Stack photos

Started by Jim K., August 03, 2024, 07:33:40 PM

Previous topic - Next topic

Jim K.

To batch scan paper photos I use an Epson FF-680W photo scanner. For each paper photo the scanner creates two images:
-   filename.jpg for the front side (foto),
-   filename_b.jpg for the backside.
In my system there is no other use for "_b.jpg" than described above.

After importing into IMatch I would like to Auto-Stack these pairs of files, to be able to switch in file window between only front side visible or optionally both side visible.

I have read the IMatch help regarding Auto-Stacking / File-Relations: Auto-Stacking and some posts in the forum, but I have to admit I didn't get it how to realize this.

Thank's in advance for your help.

Jim

Mario

Wouldn't stacking using the time stamp not work?
Even if the scanner software you use does not embed any usable metadata, IMatch will fall back to the last modified timestamp on disk. And unless your scanner outputs multiple unrelated files within the same second, this should work.

Else, consider using the {File.Name} variable. If the names are of fixed length and the scanner software appends a _b to the backside, using a variable like

{File.Name|substr:0,8}

would auto-stack all files which are identical for the first 8 characters into a stack (ignoring the _b). Adjust the 8 to the actual file names used by your scanner software.

I would also check metadata in the files to see if there is something that links the images together. This depends on your scanner software, of course.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Jim K.

Than's for your reply.

The scanner does not generate any metadata except date information. Modified date (including seconds) often is the same for the files belonging together, but sometimes more files have same date; I guess scanner software collects files and writes it down with the last scanned file in the batch.

So filename is left to be used.

I like handling of regular stack very much. Regarding to forum post 7370 "Auto-stack feature: How to control stack order?" it is said that Auto-Stacking has "the order in which you sort them in the file window". Sorting files in alphabetic order this is many times true, but unfortunately not always.

Question: is there something else to consider?

So I changed to use version stacks instead. I did following Relation Definition:
2024-08-04 14_30_55-Preferences.jpg

As list of folders F:\FOTOS\TEST_WEG is defined.

As long I copy the files in this folder it word perfectly; pairs of 1 master and 1 version are created correctly!
But when I copy the scanned files in another folder than the one above, then doing the rescan and then select all new files in file window, to then "create manual version link" following happens: the first file is taken as master and all (!) other files are taken as version (1 master, n versions).

Question: how to get the manual version link working correctly in this cae too?

Jim

Mario

#3
QuoteAs list of folders F:\FOTOS\TEST_WEG is defined.
As long I copy the files in this folder it word perfectly; pairs of 1 master and 1 version are created correctly!

Your relation rule is set to only work in this one folder. Which is very unusual.
It won't work in any other folder.  Was this intentional?
Usually you let IMatch search for versions in the same folder as the master files, or in one or more sub-folders below that.
Then your rule would work in all folders where IMatch finds masters.

There is another problem with your rule.
Your mask \.jpg$ makes all JPG files masters. Including the versions you're looking for.
Because your mask grabs both beach.jpg and beach_b.jpg.
You can try that out quickly in the tester included in the Relations dialog or in the RegExp tester app included in IMatch.

IMatch will (probably) not find versions for a file  with a name ending in _b but it will consider it a potential master nevertheless and it will search for versions whenever the folder is scanned. This may cause performance issue when every JPG may be a master or version.

I think this reg exp would work better (not really tested, give it a try yourself):

(?<!_b)\.jpg$

This considers "beach.jpg" to be a potential master, but not "beach_b.jpg" (no file names containing a _b somewhere).


QuoteBut when I copy the scanned files in another folder than the one above,
This is expected since you let IMatch search for versions only in TEST_WEG.

Quote(...) then doing the rescan and then select all new files in file window, to then "create manual version link" following happens: the first file is taken as master and all (!) other files are taken as version
When you create a manual version link, the focused file becomes the master and all other selected files become versions. This is how this works.

-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook