Page 1 of 1

column "dimensions"

Posted: 25 Mar 2024 05:01
by Veethoben
The "dimensions" column sorts the images according to their area.
I would prefer the order to be by horizontal length x height, is it possible?

Re: column "dimensions"

Posted: 25 Mar 2024 06:10
by RalphM
Set up one of the extra columns with the dimension you want to sort by.

Re: column "dimensions"

Posted: 25 Mar 2024 06:54
by Veethoben
do you mean a "width" column?
It doesn't work either...

Re: column "dimensions"

Posted: 25 Mar 2024 07:38
by highend
Add height as well and shift+left click the column header of height => Secondary sort order
1.png
1.png (24.46 KiB) Viewed 1642 times

Re: column "dimensions"

Posted: 25 Mar 2024 18:35
by Veethoben
It works fine, thank you. But... it doesn't seem very comfortable to have 3 columns for dimensions.
Perhaps if the word "pixels" could be deleted it would be more elegant and we could delete the "dimensions" column

Re: column "dimensions"

Posted: 25 Mar 2024 19:02
by highend
You can always use a scripted custom column and format the output as you need it...

Code: Select all

return property('System.Image.HorizontalSize', <cc_item>) . 'x' . property('System.Image.VerticalSize', <cc_item>);

Re: column "dimensions"

Posted: 25 Mar 2024 19:50
by Veethoben
Thanks, I'm sure it will work.
But I have never used scripting. I will study it this week.

Re: column "dimensions"

Posted: 25 Mar 2024 23:21
by pixelsearch
Great thread, it made me start to script a couple of lines with XYplorer :)
Actually, if we sort a list of images using the 'Dimensions' column (Width x Height) then the sort will always display results based on the Width coord. But what if we want a sort based on the Height coord ? (I need this from time to time)

This afternoon, after reading several posts on the Forum, one of them redirected me to https://www.xyplorer.com/release_13.90.php

In the preceding link, there is a detailed explanation which shows how to create and use the Scriptable Columns which appeared in version 13.90 (march 2014) . So finally I was able to create 3 Custom columns, which are :

Width column

Code: Select all

return gettoken((property("#image.dimensions", <cc_item>)), 1, " x ");
Height column

Code: Select all

return gettoken((property("#image.dimensions", <cc_item>)), 2, " x ");
Dimensions2 (H x W)

Code: Select all

return gettoken((property("#image.dimensions", <cc_item>)), 2, " x ") . " x " . gettoken((property("#image.dimensions", <cc_item>)), 1, " x ");
In fact, the Dimensions2 custom column (H x W) displays the opposite of the Dimension column (W x H) and can be used by itself for sorts based on image Height (without the need of the Width or Height columns, though it's great to keep all of them in the Custom Columns list, they may be useful one day, who knows).

Thanks to highend for the syntax to separate the image coords in the display, to Don for the scriptable columns and to Veethoben who created this thread. Hope this will help a bit users having the same need.

Re: column "dimensions"

Posted: 04 Apr 2024 05:09
by Veethoben
Well, leaving "dimension" in the first column and placing "width" and "height" on the far right works perfectly and is not annoying.
Thank you.