Example Code

Crop and Save a 24-bit Bitmap Image Using LabVIEW

Code and Documents

Attachment

Overview 

This VI crops and saves a 24-bit Bitmap (BMP) image.

 

Description

This VI uses the Picture Functions VIs, Graphic Formats VIs and Array Palette Functions to retrieve, crop, and save BMP Images.

 

Requirements

LabVIEW 2012 (or compatible)

 

Steps to Implement or Execute Code

  1. Open the VI.

  2. Specify the path of a 24-bit Bitmap (BMP) Image.

  3. Specify the Region Of Interest that you want to crop through the parameters XStart, XWidth, YStart, and YWidth.

  4. Run the VI.

  5. Observe the cropped Image being displayed in the VI.

  6. Observe the cropped BMP Image that is saved to disk in the same folder as the original BMP Image.

 

Additional Information or References

3504796 - VI Snippet.png

 

 

 **This document has been updated to meet the current required format for the NI Code Exchange.** 

Sincerely,
Jason Daming
Applications Engineer
National Instruments
http://www.ni.com/support

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