Convert IMAQ Image to a String Encoded as an Image File

Updated May 28, 2020

Reported In

Software

  • Vision Development Module

Issue Details

I want to convert my IMAQ image to a string encoded as an image file, like JPEG, BMP, PNG or TIF. How do I do this?

Solution

An easy way to convert an image to an encoded string is by using IMAQ Write String. This function encodes the image as IMAQ Write File 2 does, but it returns the string content instead of saving the content to a file in disk. 

Both VIs, IMAQ Write String and IMAQ Write File 2 are available through the Vision Development Module.