Resize Command
Smartsite 7 - ...
The Resize command resizes an image.
Parameters
Shorthand | Description | Type |
---|---|---|
w | Sets the output width of an image. | a positive integer value |
h | Sets the output height of an image. | a positive integer value |
mxw | Sets the maximum width of an image (it can be smaller). | a positive integer value |
mxh | Sets the maximum height of an image (it can be shorter). | a positive integer value |
mnw | Sets the minium width of an image (it can be wider). | a positive integer value |
mnh | Sets the minimum height of an image (it can be higher). | a positive integer value |
ar | Whether or not to maintain the aspect ratio when resizing the image. Defaults to 1 (maintain aspect ratio). | 0 = do not maintain, 1 = maintain aspect ratio |
Command definition
XML | Copy Code |
---|---|
<add id="resize" type="Smartsite.ImageProcessor.Commands.ResizeCommand, Smartsite.ImageProcessor" enabled="true"> <parameters> <add name="width" shortcut="w" /> <add name="height" shortcut="h" /> <add name="maxwidth" shortcut="mxw" constraint="3000" /> <add name="maxheight" shortcut="mxh" constraint="2250" /> <add name="minwidth" shortcut="mnw" /> <add name="minheight" shortcut="mnh" /> <add name="aspectratio" shortcut="ar" /> </parameters> </add> |
Examples
Original image
Width 400 pixels (?hid=img;w=400;)
Width and height 400 pixels, do not maintain aspect ratio (?hid=img;w=400;h=400;ar=0)