Owning Palette: Graphics Formats VIs
Requires: Base Development System
Reads a PNG file and creates the data necessary to display the file in a picture control.
Use the Draw Flattened Pixmap VI to display the bitmap you acquire with this VI. Use the Unflatten Pixmap VI to work with the data as a 2D array.
Note This VI can read 32-bit PNG files. |
Add to the block diagram | Find on the palette |
path to PNG file specifies the path to and name of the PNG file to read. If you do not specify a path, LabVIEW displays a file dialog box so the user can navigate to the file. | |||||||||||||||||||||
error in describes error conditions that occur before this node runs. This input provides standard error in functionality. | |||||||||||||||||||||
Transparency Thresh incorporates alpha information for a 32-bit PNG image into the mask of the resulting image data. LabVIEW treats as opaque any alpha values equal to or greater than Transparency Thresh. LabVIEW treats all other alpha values as fully transparent. The value of Transparency Thresh must be between 0 and 255. | |||||||||||||||||||||
path specifies the path of the pixmap. | |||||||||||||||||||||
image data returns information about the image so you can use the Draw Flattened Pixmap VI to draw it as a picture.
| |||||||||||||||||||||
error out contains error information. This output provides standard error out functionality. |
You might receive an error if you attempt to read a PNG file whose image type is not supported in LabVIEW. LabVIEW supports JPG, BMP, and PNG images. To load a PNG image with an unsupported image type in LabVIEW, use a third-party graphics format converter to save the image as a standard file format that LabVIEW can load (JPG, BMP, or PNG).