ZennoLab Assemblies Documentation
ImageProcessingCropFromFile Method (ZennoPoster)
Example 

Type: System.String

The file path of the image for processing.

Type: System.String

The save file path.

Type: System.Int32

The indent from left border of the image.

Type: System.Int32

The indent from top border of the image.

Type: System.Int32

The width for cropping.

Type: System.Int32

The height for cropping.

Type: System.String

Units of dimension of the parameters. It can be "pixel" or "percent".

Performs cropping of the image from file.
Syntax
public static void ImageProcessingCropFromFile( 
   string filePath,
   string savePath,
   int leftBorder,
   int topBorder,
   int cropWidth,
   int cropHeight,
   string units
)

Parameters

filePath

Type: System.String

The file path of the image for processing.

savePath

Type: System.String

The save file path.

leftBorder

Type: System.Int32

The indent from left border of the image.

topBorder

Type: System.Int32

The indent from top border of the image.

cropWidth

Type: System.Int32

The width for cropping.

cropHeight

Type: System.Int32

The height for cropping.

units

Type: System.String

Units of dimension of the parameters. It can be "pixel" or "percent".

Remarks
The default value of the units parameter is "pixel".
Example
The following example shows call the ImageProcessingCropFromFile method.
// cropping image from file, the width and height in pixel
ZennoPoster.ImageProcessingCropFromFile("C:\\ImageForCrop.jpeg", "C:\\ResultImage.jpeg", 10, 10, 150, 250, "pixel");
 
// cropping image from file, the width and height in percentage
ZennoPoster.ImageProcessingCropFromFile("C:\\ImageForCrop.jpeg", "C:\\ResultImage.jpeg", 10, 10, 75, 75, "percent");
// cropping image from file, the width and height in pixel
ZennoLab\CommandCenter\ZennoPoster::ImageProcessingCropFromFile("C:\\ImageForCrop.jpeg", "C:\\ResultImage.jpeg", 10, 10, 150, 250, "pixel");
 
// cropping image from file, the width and height in percentage
ZennoLab\CommandCenter\ZennoPoster::ImageProcessingCropFromFile("C:\\ImageForCrop.jpeg", "C:\\ResultImage.jpeg", 10, 10, 75, 75, "percent");
Requirements

Target Platforms: Desktop: Windows XP SP3 and older. Server: Windows Server 2003 and older.

See Also

Reference

ZennoPoster Class
ZennoPoster Members
ImageProcessingCropFromScreenshot Method
ImageProcessingCropFromUrl Method
ImageProcessingResizeFromFile Method
ImageProcessingResizeFromScreenshot Method
ImageProcessingResizeFromUrl Method
ImageProcessingRotateFromFile Method
ImageProcessingRotateFromScreenshot Method
ImageProcessingRotateFromUrl Method
ImageProcessingUntreatedFromFile Method
ImageProcessingUntreatedFromScreenshot Method
ImageProcessingUntreatedFromUrl Method
ImageProcessingWaterMarkImageFromFile Method
ImageProcessingWaterMarkImageFromScreenshot Method
ImageProcessingWaterMarkImageFromUrl Method
ImageProcessingWaterMarkTextFromFile Method
ImageProcessingWaterMarkTextFromScreenshot Method
ImageProcessingWaterMarkTextFromUrl Method
ImageProcessingMirrorFromFile Method
ImageProcessingMirrorFromScreenshot Method
ImageProcessingMirrorFromUrl Method

Send Feedback