Creating a Custom Column that sorts by Dimension total?

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
kluv
Posts: 35
Joined: 02 Mar 2011 13:23

Creating a Custom Column that sorts by Dimension total?

Post by kluv »

I would like to keep all my images that the WxL is 1000x1000 or more. However, some of the images that are, let's say 899x1350 are also big enough, whereas 865x1082 is not.

Is there a script or way to create a column that shows the total value of WxL?
i.e.
1000x1000= 1,000,000 :appl:
865x1082= 935,930 :naughty:

Thank you,

highend
Posts: 15016
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Creating a Custom Column that sorts by Dimension total?

Post by highend »

return property('System.Image.HorizontalSize', <cc_item>) * property('System.Image.VerticalSize', <cc_item>);
One of my scripts helped you out? Please donate via Paypal

kluv
Posts: 35
Joined: 02 Mar 2011 13:23

Re: Creating a Custom Column that sorts by Dimension total?

Post by kluv »

highend wrote: ↑22 Dec 2019 21:16 return property('System.Image.HorizontalSize', <cc_item>) * property('System.Image.VerticalSize', <cc_item>);
Thank you!! I do alot of searches on here and usually you are the one providing the answers. I hope they are all hooking you up on Paypal. Thanks again. :beer:

highend
Posts: 15016
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Creating a Custom Column that sorts by Dimension total?

Post by highend »

Thanks for the donation :tup:

Maybe something like this would be an option as well (it's easier to see if it's larger or smaller than 1.000.000):

Code: Select all

$dimensions = property('System.Image.HorizontalSize', <cc_item>) * property('System.Image.VerticalSize', <cc_item>);
    if ($dimensions >= 1000000) {
        return "> [$dimensions]";
    } else {
        return "< [$dimensions]";
    }
One of my scripts helped you out? Please donate via Paypal

Post Reply