Devesprit.ImageProcessor & Devesprit.ImageServer
Crop

Description:

Crops the current image to the given location and size. There are two modes available:

  1. Pixel based - Supply the upper-left coordinates and the new width/height.
  2. Percentage based - Supply the left, top, right, and bottom percentages as a decimal between 0 and 1 to crop with an indicator to switch mode.

Parameters:

crop

The desired location and size (x, y, width, height or left, top, right, bottom)

cropmode

The value of this parameter can be pixels or percentage

Default value: pixels

Assembly:

Devesprit.ImageServer

Example:

Pixel mode:

http://your-host/images/picture?crop=x,y,width,height

Percentage mode:

Current - Each value is a decimal between 0 and 100.

Legacy - Each value is a decimal between 0 and 1.

http://your-host/images/picture?crop=left,top,right,bottom&cropmode=percentage

Original

 

 

Result (http://your-host/images/picture?crop=10,10,30,30&cropmode=percentage)