select every other image

Started by David Werier, January 24, 2025, 04:03:06 PM

Previous topic - Next topic

David Werier

Is there a way to select every other image (as they are sorted) in the file window without having to select each one individually (while holding down the ctr key)?

graham1

I suppose it depends on why you want every other image, or what is the difference between one and the next.

If, like me, you find that you have a large and a small version of the same image which would usually show up consecutively, and you wanted to select (say) only the large ones, you could set a custom sort order by image size, image height or image width (whichever works best for you images if this is what you are trying to do), then when you sort them, the large images will all be together and you can select all of them by clicking on the first and shift-clicking on the last. 

Obviously if the reason for wanting to select alternate images is not size based, this will not help, but perhaps the general idea of setting up a custom sort order may work if your criteria match one or more of the custom search options. 

Graham

Mario

IMatch has no built-in command to select every other or every nth file. There is no real use-case for this.

As @graham1 said, it depends what makes you want to select every other image.

You can use the "Similarity" sort profile to sort visually similar/identical image next to each other, e.g. when you are removing dupes. A file size filter in the filter in the Filter Panel to hide the larger files then works just fine.

If there is anything you can use to filter/hide the first or second file, this is the trick to do. If there is nothing that makes every second file special in any way, the Ctrl+click operation is the only way.

Tip: When you accidentally click outside an image and your selection is gone, use Edit menu > Undo to restore it

David Werier

Thanks for the suggestions. I take pictures of herbarium specimens (which is a large sheet of paper with a plant and small label glued on to it). The first image is of the whole sheet. The second is of just the label. My camera takes the first image as a landscape but I had turned my camera and would like it to be in portrait. The second image my camera usually treats as a landscape, which is how I take it and what I want. So after I have a bunch of images, I select all the ones that are of the whole sheet and then change the EXIF orientation to rotate them 90° CW. The label images are usually good but sometimes my camera rotates them into landscape view. So I invert the selection and change the EXIF orientation to have "no rotation".

The file names have consecutive numbers. So, I used your suggestions and created a filter for odd number and even numbers. This will work. So thanks again for your suggestions.

Mario

If your file names are numeric, like "12345.jpg", you can use this variable with the variables filter:

{File.Name|cast:int;math:mod,2}

It transforms the file name to an integer with a cast and then uses the math modulo operation.
The variable returns 0 when the file name is even, and 1 when the file name is odd.

If your file name contains any non-numeric parts like "DSC" or _ or something, you have to use the replace function before casting and calling math.