CC snippet - Image size in inches

Discuss and share scripts and script files...
Post Reply
highend
Posts: 13311
Joined: 06 Feb 2011 00:33

CC snippet - Image size in inches

Post by highend »

How to set up a custom column with a snippet: viewtopic.php?f=7&t=18653

This one displays the size of an image in inches instead of pixel

The snippet code:

Code: Select all

Snip: CustomColumn 1
  XYplorer 18.90.0000, 22.03.2018 12:28:38
Action
  ConfigureColumn
Caption
  Size (inches)
Type
  3
Definition
      $dpi = get("Screen", "dpi");
      $hSize = property('System.Image.HorizontalSize', <cc_item>);
      $vSize = property('System.Image.VerticalSize', <cc_item>);
      if (!$hSize || !$vSize) { return "<unknown size>"; }
      return round(($hSize / $dpi), 2) . " x " . round(($vSize / $dpi), 2);
Format
  1
Trigger
  1
Item Type
  0
Item Filter
  {:Image}
It looks like this:
cc_setup.png
cc_setup.png (10.54 KiB) Viewed 1647 times
One of my scripts helped you out? Please donate via Paypal

Post Reply