Dimensions column vs image width/height columns

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
kiwichick
Posts: 648
Joined: 08 Aug 2012 04:14
Location: Windows 10 Pro 22H2, 150% scaling

Dimensions column vs image width/height columns

Post by kiwichick »

I have three custom columns for images - dimensions, image width and image height. The dimensions column is the default one included with XY - the other two are ones I created myself. What is the difference between dimensions and width/height? When it comes to icon files that contain multiple image sizes, the columns don't display the same size info. Dimensions displays the size of the largest image in the icon file while width/height display the size of a different image in the icon file.
2024-11-18_140018.png
2024-11-18_140018.png (10.41 KiB) Viewed 2069 times
Windows 10 Pro 22H2

admin
Site Admin
Posts: 64916
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Dimensions column vs image width/height columns

Post by admin »

"the other two are ones I created myself" ... it would help if you shared the how.

OK, I assume you are using the Windows shell properties Width and Height. Well, they are simply wrong (or better: unpredictable). Better trust XY (it always shows the dimensions of the largest icon in the resource). :)

kiwichick
Posts: 648
Joined: 08 Aug 2012 04:14
Location: Windows 10 Pro 22H2, 150% scaling

Re: Dimensions column vs image width/height columns

Post by kiwichick »

admin wrote: 18 Nov 2024 10:38 "the other two are ones I created myself" ... it would help if you shared the how.

OK, I assume you are using the Windows shell properties Width and Height. Well, they are simply wrong (or better: unpredictable). Better trust XY (it always shows the dimensions of the largest icon in the resource). :)
I created them in the XY custom columns config using the image width and height in the Property options.
Windows 10 Pro 22H2

admin
Site Admin
Posts: 64916
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Dimensions column vs image width/height columns

Post by admin »

As I thought: these are the Windows shell properties.

kiwichick
Posts: 648
Joined: 08 Aug 2012 04:14
Location: Windows 10 Pro 22H2, 150% scaling

Re: Dimensions column vs image width/height columns

Post by kiwichick »

admin wrote: 18 Nov 2024 19:58 As I thought: these are the Windows shell properties.
Thanks Don. So, is there any way to use XY dimensions in separate columns rather than having the dimensions together? Sometimes I want to sort images by either width or height.
Windows 10 Pro 22H2

admin
Site Admin
Posts: 64916
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Dimensions column vs image width/height columns

Post by admin »

Image width and height are available as special properties since 20240308, but they are not (yet) available in the Special Properties list, kind of 2nd class Special Properties. So you need a scripted custom column to use them, e.g.:

Code: Select all

Snip: CustomColumn 1
  XYplorer 26.60.0312, 11/24/2024 11:19:48 AM
Action
  ConfigureColumn
Caption
  Image Width
Type
  3
Definition
  return property("#image.width", <cc_item>);
Format
  0
Trigger
  0
Item Type
  0
Item Filter
  {:Image}
CC_ImageWidth.png
CC_ImageWidth.png (9.7 KiB) Viewed 1767 times
:arrow: Same for height: return property("#image.height", <cc_item>);

PS: Setting the item filter is not really necessary unless you want to exclude video files.

kiwichick
Posts: 648
Joined: 08 Aug 2012 04:14
Location: Windows 10 Pro 22H2, 150% scaling

Re: Dimensions column vs image width/height columns

Post by kiwichick »

admin wrote: 24 Nov 2024 11:24 Image width and height are available as special properties since 20240308, but they are not (yet) available in the Special Properties list, kind of 2nd class Special Properties. So you need a scripted custom column to use them, e.g.:

Code: Select all

Snip: CustomColumn 1
  XYplorer 26.60.0312, 11/24/2024 11:19:48 AM
Action
  ConfigureColumn
Caption
  Image Width
Type
  3
Definition
  return property("#image.width", <cc_item>);
Format
  0
Trigger
  0
Item Type
  0
Item Filter
  {:Image}
:arrow: Same for height: return property("#image.height", <cc_item>);

PS: Setting the item filter is not really necessary unless you want to exclude video files.
Perfect. Thank you very much, Don.
Windows 10 Pro 22H2

Post Reply