Crop Command

Smartsite 7 - ...

The Crop command crops an image.

Parameters

Shorthand Description Type
crt Crops the top of an image positive integer value
crl Crops the left of an image positive integer value
crr Crops the right of an image positive integer value
crb Crops the bottom of an image positive integer value
crh Sets the crop height positive integer value
crw Sets the crop width positive integer value

Command definition

XML CopyCode image Copy Code
  <add id="crop" type="Smartsite.ImageProcessor.Commands.CropCommand, Smartsite.ImageProcessor" enabled="true">
    <parameters>
      <!-- crop values in pixels -->
      <add name="croptop" shortcut="crt" />
      <add name="cropleft" shortcut="crl" />
      <add name="cropright" shortcut="crr" />
      <add name="cropbottom" shortcut="crb" />
      <add name="cropheight" shortcut="crh" />
      <add name="cropwidth" shortcut="crw" />
    </parameters>
  </add>

Examples

Original image
Original image

Example: crop left 250px
Crop left 250 pixels (?hid=img;crl=250;)

Example: crop left 450px, crop top 100px, crop width and height 500
Crop left 450 pixels, crop top 100 pixels, crop width and height 500 pixels (?hid=img;crl=450;crt=100;crw=500;crh=500)