Home Search

DriveWorks Pro 22
Convert Color In Image To Be Transparent

Send Feedback

Convert Color In Image To Be Transparent

This Specification Macro Task will let you choose a specific color to convert to transparency. The color to convert can be defined by its color name or its corresponding RGB or HEX values.


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.
ColorUsed to designated which color to convert to transparency. Can be the name of the color or its RGB or HEX corresponding value.


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.
Color"Gray"GrayThis is the name of the color to swap in the image. Can also use Hex and RGB values.

Source Image

This is the source image that will be used.

This image has a gray background that we would like to convert to transparent.

Gray can be considered as different values:

Color NameGray


This is visual representation of the Gray background being swapped for a transparent background.