Skip to content

New collection filter for (original) image dimensions - #21677

Merged
TurboGit merged 4 commits into
darktable-org:masterfrom
zisoft:image-dimension-filter
Aug 5, 2026
Merged

New collection filter for (original) image dimensions#21677
TurboGit merged 4 commits into
darktable-org:masterfrom
zisoft:image-dimension-filter

Conversation

@zisoft

@zisoft zisoft commented Aug 1, 2026

Copy link
Copy Markdown
Collaborator

This PR adds a new collection filter for the image dimensions.

Bildschirmfoto 2026-08-01 um 08 06 42 Bildschirmfoto 2026-08-01 um 08 05 54 Bildschirmfoto 2026-08-01 um 08 06 23

Search is performed using wildcards, so one can enter the full dimensions like 6000x4000 or only parts of that:

  • 6000x4000 - full match
  • 6000x - all images with 6000 width
  • x4000 - all images with 4000 height
  • ...

closes #21577

Comment thread src/common/collection.h Outdated
@ralfbrown ralfbrown added feature: new new features to add scope: DAM managing files, collections, archiving, metadata, etc. labels Aug 1, 2026
@HansBull

HansBull commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

This would benefit from a CREATE INDEX "img_dim" ON "images" (width || 'x' || height)

@zisoft

zisoft commented Aug 2, 2026

Copy link
Copy Markdown
Collaborator Author

@HansBull : good idea, but unfortunately such indexes do not work on LIKE queries.

@HansBull

HansBull commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

@zisoft Sure, and that's true for many other parts of the codebase. But the initial population of the list in misc.c‎ would be snappier. YMMV, though ;-)

@zisoft

zisoft commented Aug 2, 2026

Copy link
Copy Markdown
Collaborator Author

Release notes:

Added a new collection filter for the original image dimensions.

@wpferguson

Copy link
Copy Markdown
Member

@zisoft could you add new collection property to the luaA_enum_values in collect.c please?

@zisoft

zisoft commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator Author

@wpferguson : I always forget this, sorry.

I have added DT_COLLECTION_PROP_DUPLICATES and DT_COLLECTION_PROP_DIMENSIONS.

@wpferguson

Copy link
Copy Markdown
Member

@zisoft that's why you have me 😁

Thanks

@TurboGit TurboGit added this to the 5.8 milestone Aug 4, 2026
@TurboGit

TurboGit commented Aug 4, 2026

Copy link
Copy Markdown
Member

On my side I don't have this filter:

image

@zisoft

zisoft commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator Author

???

@TurboGit

TurboGit commented Aug 4, 2026

Copy link
Copy Markdown
Member

Yep, that's strange... no idea why for now.

@TurboGit

TurboGit commented Aug 4, 2026

Copy link
Copy Markdown
Member

Sorry I was looking at the collection module and not at the collection filters one :) Will test later.

@TurboGit

TurboGit commented Aug 4, 2026

Copy link
Copy Markdown
Member

The right-click does not work, on my side when I right click on the entry of the module I get the GNOME default copy/paste actions.

image

@zisoft

zisoft commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator Author

Very strange. It is just an enhancement of the 'misc' filter. Does that mean that the other misc filters (camera, lens, flash, exposure program, ...) don't work either on your system?

They all use the same code.

Edit: It is a collection FILTER, so your current collection should contain at least some images...

Edit 2: Rebased on current master and it does not work on my system, too.
Most likely the now merged #21659 ?

Edit 3: confirmed, if I drop commit 98d894a it is working again.

@Arecsu

Arecsu commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

@zisoft @TurboGit found a bug in event controllers in master, will push a new PR. It is related to this

And then one to your branch @zisoft to port your code to controllers :)

@Arecsu

Arecsu commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Here is the PR #21718

@zisoft after this one lands master, rebase this PR and you should be ready to go. I thought your code needed some wiring but no, it's fine.

#21659 converted the misc filter entries to event controllers, but the gesture only listened for the primary button, so right-click on any misc filter (camera, lens, flash, …) showed the default cut/copy menu instead of the "select existing values" popup.

@TurboGit TurboGit left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merging now. Thanks!

@TurboGit
TurboGit merged commit eb156a5 into darktable-org:master Aug 5, 2026
5 checks passed
@zisoft
zisoft deleted the image-dimension-filter branch August 5, 2026 17:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature: new new features to add scope: DAM managing files, collections, archiving, metadata, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Original image dimensions (width / height) as searchable features

6 participants