From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Example Code

Re-Size Pictures using LabVIEW and Vision Development Module

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

  • Vision Development Module
  • LabVIEW

Code and Documents

Attachment

Download All

Overview

The example demonstrates how to resize a image with IMAQ functions.

 

Description

A image file with a high resolution can easily take up several megabytes of disk space. In many cases a smaller resolution is perfectly sufficient with nice side effect to be able to save disk space or internet bandwidth when sending the image.

The example demonstrates how to resize a image with Vision Development Module functions. The VI can be easily modified to be used as a subVI without an user interface (UI).

 

Requirements

 Software

  • LabVIEW 2012 Base Development System (or compatible)
  • Vision Development Module 2012 (or compatible)

 Hardware

  • No hardware is necessary to use this example VI

 

Steps to Implement or Execute Code

  1. Open the attached file
  2. Select a image file to resize (an example image is provided in the 'data' subdirectory)
  3. Select the Image Width the selected image should be resized to
  4. Run the VI
  5. Check the result. The resized image has been saved in the same directory as the original image

 

Additional Information or References

IMAQ Resize Image - Front Panel.png

 

IMAQ Resize Image - 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.**

Ashish Naik
Automotive Business Development Manager
National Instruments UK

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