VI class/VI Icon.Set From Image Data method

From LabVIEW Wiki
Jump to: navigation, search
VI Server Method Information
Method ID 422
Scope Basic Development Environment
Data Name VI Icon.Set from Image Data
Short Name* VI Icon.Set from Image Data
Long Name* VI Icon:Set From Image Data
* Displayed here in English. Short and Long names appear in the language of the LabVIEW IDE.
Owning Class ID 2
Owning Class Name VI Class
Return Data Type No return value
Invoke Node VI Icon:Set From Image Data
Available in Real-Time Operating SystemYes
Available in Run-Time EngineNo
Available with control VIsYes
Available with global VIsYes
Available with polymorphic VIsYes
Available with strict type definitionsNo
Loads the block diagram into memoryNo
Loads the front panel into memoryNo
Must wait until user interface is idleNo
Need to authenticate before useYes
Remote access allowedYes
Settable when the VI is runningYes

Sets a VI icon from image data you specify. LabVIEW creates a user layer called VI Icon for the image and deletes any other existing icon information from the Icon Editor dialog box.

If you want to use a pixmap to set the icon, use the Flatten Pixmap VI to convert the data to an image data cluster before using this method. If you want to use a picture to set the icon, use the Picture to Pixmap VI to convert the data to an image data cluster before using this method. Use the Create Mask VI to make a certain color in the image data transparent before wiring the image data to this method.

This method converts the image data you wire to an input to the appropriate color depth. For example, if you wire 4-bit image data to the Color256 input, this method converts the image data to a color depth of 8-bit.

If you do not wire image data to the Color16 input, LabVIEW converts the image data you wire to the Color256 input to a color depth of 4-bit. If you do not wire image data to the Monochrome input, LabVIEW converts the image data you wire to the Color16 input, if available, to a color depth of 1-bit. Otherwise, LabVIEW converts the image data you wire to the Color256 input to a color depth of 1-bit.

If the image data you wire to this method describes an image larger or smaller than 32 × 32 pixels, the method resizes the image to 32 × 32 pixels.

You also can use the VI Icon:Set from File method to set a VI icon from an image file.

Parameters

Data type Name Required Description
Common Cluster TypeDef Color 256 Yes
Common Cluster TypeDef Color 16 No
Common Cluster TypeDef Monochrome No Specifies image data to use as the 1-bit icon. The Icon Editor dialog box saves icons in both 256-color (8-bit) and monochrome (1-bit) format.

Uses

History

Version Change(s)
LabVIEW 2018 More info to come.

See Also

External Links