ImageProcessor user guide

Release 1.0 - ...

This page gives an overview of the image command behavior and all the commands implemented and configured with the current build of ImageProcessor.

Image commands rules

  • All commands defined in the configuration are always executed with the parameter values as specified in the configuration when an image is being processed.
  • Configuration parameter values can be overridden in the querystring
  • Parameter values can be restricted using the constraint attribute
  • A parameters is technically a property on an image command
  • An image command can have zero or more parameters
  • Image commands may be executed more than once, when the execution order is set to order of appearance (o=2) (see below).

XML CopyCode image Copy Code
<!-- resizes an image -->
   <add 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>

Execution order

The execution order of the specified commands can be set as well, by means of specifying the parameter "o" with the appropriate value:

  • CropRotateScaleMirrorFirst (or "0")
    Crop, rotate, scale, mirror and the remaining commands in order of appearance within the configuration.
    This is the default execution order.
  • RotateCropScaleMirrorFirst (or "1")
    Rotate, crop, scale, mirror and the remaining commands in order of appearance within the configuration.
  • Appearance (or "2")
    The commands are executed in order of appearance on the query string. (This order is the only option where image commands may appear more than once.)
  • Configuration (or "3")
    The commands are executed in order of appearance within the configuration.

Remarks

As of Smartsite 7.8, the Image Processor uses it's own implementation to execute commands / apply filters and is no longer dependent on a third-party component.
Within the process of rewriting the Image Processor functionality, support for several more or less rare filetypes has been dropped, such as *.wmf and *.emf.

Furthermore, the metadata command is no longer supported. However, several new commands / filters have become available, such as commands / filters for gamma correction, adjusting brightness and contrast, sepia filter, etcetera.

Topics