Home Search

DriveWorks Pro 22
Crop An Image By Removing Whitespace Or Transparency

Send Feedback

Crop An Image By Removing Whitespace Or Transparency

This Specification Macro Task will crop an image by removing as much whitespace or transparency as possible around the Source image.

Please note that only pure white is considered as whitespace and that only a transparency level between 80 and 100% will be considered as transparent.

Properties

Property NameDescription
TitleChanges the Title (not the name) of the Task.
SourceThe Full File Path and Name of the Source image file to transform, including its extension
DestinationThe Full File Path and Name of the image file to create, including its extension.
Constant NameThe name of the Constant used to report on the success of the Task. If it is a success this will be used to store the Path of the generated image.
OverwriteTRUE to overwrite an existing image, FALSE to keep the existing image.
Sides To CropDefine which sides to crop with a pipebar delimited list of sides, for example:

"LEFT|RIGHT|TOP|BOTTOM"

Leave empty or use "ALL" to crop all sides.

Example

When this Task is added the properties are static. To be able to build rules on a static properties see How To: Change A Static Property To A Dynamic Property.

Property NameExample RuleExample ResultMeaning
Source"C:\MyDocuments\Content\Images\WorldGraphic.png"C:\MyDocuments\Content\Images\WorldGraphic.pngThis is the Full File Path and Name including extension to the source file to use.
DestinationFsGetFullPath("<Specification>\ConvertedWorldGraphic.png")C:\MyDocuments\Projects\Specifications\Spec 9999\ConvertedWorldGraphic.pngThis is the location where the new file will be created.
Constant Name"DWConstantReport"DWConstantReportThis is the name of the Constant that the Task will report to.
OverwriteTRUETRUETRUE will overwrite the file if it exists FALSE will not.
Sides To Crop"ALL"ALLWill crop all sides of the source image.

Source Image

The source image is 600 pixels wide by 450 pixels high.

Result

This image is now 221 pixels wide by 221 pixels high.