Example Code

Synchronous Image for WebVI

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.


  • G Web Development Software

Code and Documents



Synchronous Image gives a control similar to the URL Image control built-in to G Web Development Software but is intended to be used as an image that updates rapidly. See a demo in your browser.


Behavior of the G Web built-in URL Image:

  • Great for relatively static images or images that change infrequently
  • Behaves like the browser native <img> tag
  • Updating the url clears the image immediately and allows the image to progressively load if supported by the image
  • If updated too quickly can appear to flicker or appear to ignore the change in url (the url changes again before the image has loaded)


Behavior of the Synchronous Image example:

  • Great for images that change quickly
  • Updating the url is blocking and the image is only updated after loading has finished
  • Can only update the url as fast as the new image loads so no flickering in the image




Release 2: Added Update Source By Byte Array

Release 1: First Release



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

Trusted Enthusiast Trusted Enthusiast
Trusted Enthusiast

super ! bravo!