Page 1 of 1

Dimensions column vs image width/height columns

Posted: 18 Nov 2024 02:16
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 2071 times

Re: Dimensions column vs image width/height columns

Posted: 18 Nov 2024 10:38
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). :)

Re: Dimensions column vs image width/height columns

Posted: 18 Nov 2024 19:08
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.

Re: Dimensions column vs image width/height columns

Posted: 18 Nov 2024 19:58
by admin
As I thought: these are the Windows shell properties.

Re: Dimensions column vs image width/height columns

Posted: 24 Nov 2024 02:02
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.

Re: Dimensions column vs image width/height columns

Posted: 24 Nov 2024 11:24
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 1769 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.

Re: Dimensions column vs image width/height columns

Posted: 26 Nov 2024 09:58
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.