Bug 121313

Summary: Filter pictures by aspect ratio [patch]
Product: [Applications] digikam Reporter: Julien Narboux <Julien>
Component: Albums-FiltersAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: wishlist CC: caulier.gilles, geow812, kde, simon.eu
Priority: NOR    
Version: 3.0.0   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In: 3.2.0
Sentry Crash Report:
Attachments: Add "filter by aspect ratio" to the text filter part

Description Julien Narboux 2006-02-03 19:52:48 UTC
Version:            (using KDE Devel)
Installed from:    Compiled sources

When you need to choose a photo to print it in order to put it in a frame 
you need a special aspect ratio.

It could be convenient to either :

- have a sort by aspect ratio option or
- a filter by aspect ratio in the filter tab

Filtering by aspect ratio can also be useful during the preparation of a photomosaic.
Comment 1 Fabien 2007-10-09 12:08:43 UTC
Yes, I agree.
I would also need that when I upload to an online print service.
Comment 2 caulier.gilles 2007-10-23 10:51:55 UTC
For any performance reason, a filter by aspect ratio can be only done for KDE4 with the new DB format. Why ? because size of image is not stored in DB with KDE3 version and if we want to implement it, we need to scan images in th fly dim to load image and it will take a while...

With KDE4 version, thes informations are now stored in DB and updated when it's necessary.

Gilles 
Comment 3 Arnd Baecker 2008-07-10 17:26:08 UTC
Marcel,

I think that this would be another one which could be added
to the "Picture Properties" Advanced search in 0.10, 
what do you think?

Best, Arnd
Comment 4 Marcel Wiesweg 2008-07-10 22:07:09 UTC
Yes. We have width and height, so we can search for width/height.

Now looking at the code, there is still the search widget missing for width, height, megapixels (and aspect ratio).
I have not yet come up with a good UI idea.
Comment 5 Arnd Baecker 2008-07-11 10:10:15 UTC
Maybe something like
   Width  =  ____       Width  >= _____   and  Width  <= _____
   Height =  ____       Height >= _____   and  Height <= _____
   MP     =  ____       MP     >= _____   and  MP     <= _____
   Aspect ratio:   [Combo-Box]  Custom  ___:___ 
   (like the aspect ratio crop for the image editor)
Comment 6 Mikolaj Machowski 2008-07-11 15:56:08 UTC
I would like to see option to sort by orientation: portrait, landscape.
Comment 7 Fabien 2008-07-11 16:23:26 UTC
About #6 (portrait/landscape) Yes me too !
Comment 8 Julien Narboux 2008-07-14 12:35:24 UTC
I think the >= and <= fields, could be available for aspect ratio as well. for instance if you want to find picture that fit into a given frame, you look for instance for picture of aspect ratio 4/3 +- 10 %.

Maybe you have the frame and you may put it on the wall in both landscape and portrait orientations. Maybe you have the frame and really need to put it into landscape.

So maybe the easiest would be to have a three choices box: only portrait, only landscape, or both + the ratio combo box like in aspect ratio crop + a percentage for precision +- the given percentage.

Julien

Comment 9 caulier.gilles 2008-07-14 13:45:57 UTC
Marcel,

The standard apect ratio values list is given Image Editor Ratio Crop tool. look in settings area on the right of plugin dialog.

Gilles
Comment 10 Gandalf Lechner 2008-07-18 15:40:51 UTC
#8 sounds like a good solution to me. Maybe one could furthermore add the possibility to filter by min/max width/height? This would give the user complete control over the dimension search options.

Gandalf
Comment 11 Chris Samuel 2009-07-23 08:16:07 UTC
Just to chip in and say that I'd really like to be able to search/filter images by landscape/portrait orientation.

Currently in 1.0-beta1 you can search for orientation, but the options you can select all seem to revolve around (if you'll pardon the pun) image rotations.

I needed to select landscape images for a competition I'm entering and this would have made my life a lot easier!
Comment 12 caulier.gilles 2010-10-03 10:52:46 UTC
*** Bug 212740 has been marked as a duplicate of this bug. ***
Comment 13 simon.schaak 2010-12-25 11:05:31 UTC
*** This bug has been confirmed by popular vote. ***
Comment 14 caulier.gilles 2013-01-29 09:33:38 UTC
See review board patch : https://git.reviewboard.kde.org/r/108574/
Comment 15 Yiou Wang 2013-04-12 21:24:41 UTC
Created attachment 78847 [details]
Add "filter by aspect ratio" to the text filter part

I worked out a patch to enable filter by apect ratio in the text filter part. With this patch we can tap aspect ratio in the form of a float which is the product: width/height, or a string like "x:y" where x is the width and y is the height.

This patch includes Stephan's aspect ratio patch.

However I haven't added the "search by aspect ratio" functionality in the advanced search part yet. I'm actually working on it.