Example Code

Change Picture Control's Color Depth

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW

Code and Documents

Attachment

Overview

This code demonstrates how to change the color depth of an image loaded from an image file.

 

Description

This example shows how to use the Picture to Pixmap VI to change the color-depth of your image. This is useful if you want to reduce the size of an image transfered over the network.

 

Requirements

 Software

  • LabVIEW Base Development System 2012 (or compatible)
  • If running in a Real-Time context, you will need the LabVIEW Real-Time Module 2012 (or compatible)

 Hardware

  • No hardware is necessary to use this example VI

 

 Steps to Implement or Execute Code

  1. Download and open the attached ZIP-file
  2. Run the VI

 

Additional Information or References

Change Picture Color Depth - Front Panel.png

 

Change Picture Color Depth - Block Diagram.png

 

**The code for this example has been edited to meet the new Community Example Style Guidelines. The edited copy is marked with the text ‘NIVerified’. Read here for more information about the new Example Guidelines and Community Platform.**

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.