Home Search

DriveWorks Pro 22
Add Transparent Padding To An Image

Send Feedback

Add Transparent Padding To An Image

This Specification Macro Task will add transparent padding to an image.

Properties

Property NameDescription
TitleChanges the Title (not the name) of the Task.
SourceThe Full File Path and Name of the Source file to use.
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.
OverwriteTRUE to overwrite the destination file, otherwise FALSE.
WidthThe new width of the image in pixels.
HeightThe new height of the image in pixels.
Left PointThe left value of the insertion point.
Top PointThe top value of the insertion point.

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>\PaddedWorldGraphic.png")C:\MyDocuments\Projects\Specifications\Spec 9999\PaddedWorldGraphic.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.
Width10001000The new image created will be 1000 pixels in width. This includes the image to use and the added in Transparent Padding.
Height600600The new image created will be 600 pixels in width. This includes the image to use and the added in Transparent Padding.
Left Point00This is the value in pixels from the left side that the source image will be inserted. 0 would place the source image on the far left side of the new image.
Top Point00This is the value in pixels from the Top that the source image will be inserted. 0 would place the image directly at the top of the new image.

Source Image

This is the source image that will be used.

Result

Here is an example of what will be produced. The hashed area represents the Transparent Padding that will be added to the created image.

Status Outputs

This task supports Status Outputs. They can be used to perform different actions depending on what the status outcome of the task is. For more information see Status Outputs in the Task Node Outputs section of Specification Macros Task Node.

The status output navigation is as follows:

Success

  • The image has been created.

Success with Warnings

  • N/A - should never be fulfilled.

Failure (one of the following occurred)

  • Generic failure - Check the Specification report for more details.
  • Unable to process the image. No source file was specified.
  • Unable to process the image. No destination file was specified.
  • Unable to process the image. Source file <File Path and Name> contains invalid characters.
  • Unable to process the image. Destination file <File Path and Name> contains invalid characters.
  • Unable to process the image. Source file <File Path and Name> is too long.
  • Unable to process the image. Destination file <File Path and Name> is too long.
  • Unable to process the image. Could not find source file <File Path and Name>.