IMAQ Write File 2 VI

NI Vision 2018 for LabVIEW Help

Edition Date: March 2018

Part Number: 370281AE-01

»View Product Info
Download Help (Windows Only)
Owning Palette: Files
Requires: NI Vision Development Module

Writes the image to a file in the selected format.

Use the pull-down menu to select an instance of this VI.

IMAQ Write BMP File 2

Writes an image to a file in BMP format. Color Palette is used to apply a color palette to an image.

Supported Image Types

8-bit unsigned grayscale 32-bit RGB

IMAQ Write BMP File 2

/images/reference/en-XX/help/370281AE-01/c1dnclst.gif

Color Palette is used to apply a color palette to an image. Color Palette is an array of clusters constructed by the user or supplied by the IMAQ GetPalette VI. This palette is composed of 256 elements for each of the three color planes (red, green, and blue). A specific color is the result of applying a value between 0 and 255 to each of the three color planes. If the three planes have identical values, a gray level is obtained (0 specifies black and 255 specifies white). If the image type requires a color palette and it is not supplied, a grayscale color palette is generated and written.

/images/reference/en-XX/help/370281AE-01/cu8.gif

Red is the value of the red color plane.

/images/reference/en-XX/help/370281AE-01/cu8.gif

Green is the value of the green color plane.

/images/reference/en-XX/help/370281AE-01/cu8.gif

Blue is the value of the blue color plane.

/images/reference/en-XX/help/370281AE-01/cgenclasstagrefflat.gif

Image is a reference to the image structure to write as an image file.

/images/reference/en-XX/help/370281AE-01/cpath.gif

File Path is the complete pathname, including drive, directory, and filename, of the file to write.

/images/reference/en-XX/help/370281AE-01/cbool.gif

Compress? (N) designates whether to compress the BMP file. By default, the image file is not compressed (FALSE). If it is compressed, it uses the Run Length Encoded compression type.

/images/reference/en-XX/help/370281AE-01/cerrcodeclst.gif

error in (no error) describes the error status before this VI or function runs. The default is no error. If an error occurred before this VI or function runs, the VI or function passes the error in value to error out. This VI or function runs normally only if no error occurred before this VI or function runs. If an error occurs while this VI or function runs, it runs normally and sets its own error status in error out. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. Use error in and error out to check errors and to specify execution order by wiring error out from one node to error in of the next node.

/images/reference/en-XX/help/370281AE-01/cbool.gif

status is TRUE (X) if an error occurred before this VI or function ran or FALSE (checkmark) to indicate a warning or that no error occurred before this VI or function ran. The default is FALSE.

/images/reference/en-XX/help/370281AE-01/ci32.gif

code is the error or warning code. If status is TRUE, code is a nonzero error code. If status is FALSE, code is 0 or a warning code.

/images/reference/en-XX/help/370281AE-01/cstr.gif

source describes the origin of the error or warning and is, in most cases, the name of the VI or function that produced the error or warning. The default is an empty string.

/images/reference/en-XX/help/370281AE-01/igenclasstagrefflat.gif

Image Out (duplicate) is a reference to Image. This VI does not modify the image connected to the Image input.

/images/reference/en-XX/help/370281AE-01/ierrcodeclst.gif

error out contains error information. If error in indicates that an error occurred before this VI or function ran, error out contains the same error information. Otherwise, it describes the error status that this VI or function produces. Right-click the error out indicator on the front panel and select Explain Error from the shortcut menu for more information about the error.

/images/reference/en-XX/help/370281AE-01/ibool.gif

status is TRUE (X) if an error occurred or FALSE (checkmark) to indicate a warning or that no error occurred.

/images/reference/en-XX/help/370281AE-01/ii32.gif

code is the error or warning code. If status is TRUE, code is a nonzero error code. If status is FALSE, code is 0 or a warning code.

/images/reference/en-XX/help/370281AE-01/istr.gif

source describes the origin of the error or warning and is, in most cases, the name of the VI or function that produced the error or warning. The default is an empty string.

IMAQ Write JPEG File 2

Writes an image to a file in JPEG format.

Note  JPEG format is not recommended if you want to make precise gauging or inspection measurements on the image.

Supported Image Types

8-bit unsigned grayscale 32-bit RGB

IMAQ Write JPEG File 2

/images/reference/en-XX/help/370281AE-01/c1dnclst.gif

Color Palette is an unused input. The JPEG file format does not support color palettes. The input exists to address backward-compatibility issues.

/images/reference/en-XX/help/370281AE-01/cgenclasstagrefflat.gif

Image is a reference to the image structure to write as an image file.

/images/reference/en-XX/help/370281AE-01/cpath.gif

File Path is the complete pathname, including drive, directory, and filename, of the file to read.

/images/reference/en-XX/help/370281AE-01/cu32.gif

Image Quality specifies the amount of compression applied to the image. Image Quality can range from 0 to 1000. The default value is 750. The higher the value, the less compression the VI applies.

Note  JPEG compression is lossy, which means that the lower the quality specified, the more loss takes place during the compression. Also, a small amount of loss can occur even when the quality is 1000.
/images/reference/en-XX/help/370281AE-01/cerrcodeclst.gif

error in (no error) describes the error status before this VI or function runs. The default is no error. If an error occurred before this VI or function runs, the VI or function passes the error in value to error out. This VI or function runs normally only if no error occurred before this VI or function runs. If an error occurs while this VI or function runs, it runs normally and sets its own error status in error out. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. Use error in and error out to check errors and to specify execution order by wiring error out from one node to error in of the next node.

/images/reference/en-XX/help/370281AE-01/cbool.gif

status is TRUE (X) if an error occurred before this VI or function ran or FALSE (checkmark) to indicate a warning or that no error occurred before this VI or function ran. The default is FALSE.

/images/reference/en-XX/help/370281AE-01/ci32.gif

code is the error or warning code. If status is TRUE, code is a nonzero error code. If status is FALSE, code is 0 or a warning code.

/images/reference/en-XX/help/370281AE-01/cstr.gif

source describes the origin of the error or warning and is, in most cases, the name of the VI or function that produced the error or warning. The default is an empty string.

/images/reference/en-XX/help/370281AE-01/igenclasstagrefflat.gif

Image Out (duplicate) is a reference to Image. This VI does not modify the image connected to the Image input.

/images/reference/en-XX/help/370281AE-01/ierrcodeclst.gif

error out contains error information. If error in indicates that an error occurred before this VI or function ran, error out contains the same error information. Otherwise, it describes the error status that this VI or function produces. Right-click the error out indicator on the front panel and select Explain Error from the shortcut menu for more information about the error.

/images/reference/en-XX/help/370281AE-01/ibool.gif

status is TRUE (X) if an error occurred or FALSE (checkmark) to indicate a warning or that no error occurred.

/images/reference/en-XX/help/370281AE-01/ii32.gif

code is the error or warning code. If status is TRUE, code is a nonzero error code. If status is FALSE, code is 0 or a warning code.

/images/reference/en-XX/help/370281AE-01/istr.gif

source describes the origin of the error or warning and is, in most cases, the name of the VI or function that produced the error or warning. The default is an empty string.

IMAQ Write JPEG2000 File 2

Writes an image to a file in JPEG2000 format.

Note  This VI is not supported on VxWorks targets.

Supported Image Types

8-bit unsigned grayscale 16-bit unsigned grayscale 32-bit RGB 16-bit signed grayscale 64-bit RGB

IMAQ Write JPEG2000 File 2

/images/reference/en-XX/help/370281AE-01/c1dnclst.gif

Color Palette is used to apply a color palette to an image. Color Palette is an array of clusters constructed by the user or supplied by the IMAQ GetPalette VI. This palette is composed of 256 elements for each of the three color planes (red, green, and blue). A specific color is the result of applying a value between 0 and 255 to each of the three color planes. If the three planes have identical values, a gray level is obtained (0 specifies black and 255 specifies white). If the image type requires a color palette and it is not supplied, a grayscale color palette is generated and written.

/images/reference/en-XX/help/370281AE-01/cu8.gif

Red is the value of the red color plane.

/images/reference/en-XX/help/370281AE-01/cu8.gif

Green is the value of the green color plane.

/images/reference/en-XX/help/370281AE-01/cu8.gif

Blue is the value of the blue color plane.

/images/reference/en-XX/help/370281AE-01/cgenclasstagrefflat.gif

Image is a reference to the image structure to write as an image file.

/images/reference/en-XX/help/370281AE-01/cpath.gif

File Path is the complete pathname, including drive, directory, and filename, of the file to read.

/images/reference/en-XX/help/370281AE-01/cbool.gif

Lossless? (true) specifies the type of compression used to save the image. Set this parameter to TRUE to save the image with no loss of data. Set this parameter to FALSE to save the image with a loss of data.

/images/reference/en-XX/help/370281AE-01/cerrcodeclst.gif

error in (no error) describes the error status before this VI or function runs. The default is no error. If an error occurred before this VI or function runs, the VI or function passes the error in value to error out. This VI or function runs normally only if no error occurred before this VI or function runs. If an error occurs while this VI or function runs, it runs normally and sets its own error status in error out. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. Use error in and error out to check errors and to specify execution order by wiring error out from one node to error in of the next node.

/images/reference/en-XX/help/370281AE-01/cbool.gif

status is TRUE (X) if an error occurred before this VI or function ran or FALSE (checkmark) to indicate a warning or that no error occurred before this VI or function ran. The default is FALSE.

/images/reference/en-XX/help/370281AE-01/ci32.gif

code is the error or warning code. If status is TRUE, code is a nonzero error code. If status is FALSE, code is 0 or a warning code.

/images/reference/en-XX/help/370281AE-01/cstr.gif

source describes the origin of the error or warning and is, in most cases, the name of the VI or function that produced the error or warning. The default is an empty string.

/images/reference/en-XX/help/370281AE-01/csgl.gif

Compression Ratio is the degree to which to compress the JPEG2000 file. For example, if the Compression Ratio is 50, the resulting file will be 50 times smaller than the size of the image in memory. This parameter is ignored if Lossless? is TRUE.

/images/reference/en-XX/help/370281AE-01/ccclst.gif

Advanced Options is a cluster of optional values that you can use to set advanced JPEG2000 options. This cluster consists of the following elements:

/images/reference/en-XX/help/370281AE-01/ci32.gif

Wavelet transform mode determines the wavelet transform to use when writing the file.

/images/reference/en-XX/help/370281AE-01/cbool.gif

Use multi-component transform? specifies whether or not to use a multi-component transform. This parameter has no effect when encoding grayscale images.

/images/reference/en-XX/help/370281AE-01/ci32.gif

Max wavelet transform level specifies the maximum allowed level of wavelet transform. Increasing this value will result in a more accurate image, but will increase the time to write the image. Valid values are from 0 to 255.

/images/reference/en-XX/help/370281AE-01/csgl.gif

Quantization step size specifies the absolute base quantization step size for derived quantization mode. This parameter has no effect when Wavelet transform mode is Integer.

/images/reference/en-XX/help/370281AE-01/igenclasstagrefflat.gif

Image Out (duplicate) is a reference to Image. This VI does not modify the image connected to the Image input.

/images/reference/en-XX/help/370281AE-01/ierrcodeclst.gif

error out contains error information. If error in indicates that an error occurred before this VI or function ran, error out contains the same error information. Otherwise, it describes the error status that this VI or function produces. Right-click the error out indicator on the front panel and select Explain Error from the shortcut menu for more information about the error.

/images/reference/en-XX/help/370281AE-01/ibool.gif

status is TRUE (X) if an error occurred or FALSE (checkmark) to indicate a warning or that no error occurred.

/images/reference/en-XX/help/370281AE-01/ii32.gif

code is the error or warning code. If status is TRUE, code is a nonzero error code. If status is FALSE, code is 0 or a warning code.

/images/reference/en-XX/help/370281AE-01/istr.gif

source describes the origin of the error or warning and is, in most cases, the name of the VI or function that produced the error or warning. The default is an empty string.

IMAQ Write PNG File 2

Writes an image to a file in PNG format.

Supported Image Types

8-bit unsigned grayscale 16-bit unsigned grayscale 32-bit RGB 16-bit signed grayscale 64-bit RGB

IMAQ Write PNG File 2

/images/reference/en-XX/help/370281AE-01/c1dnclst.gif

Color Palette is used to apply a color palette to an image. Color Palette is an array of clusters constructed by the user or supplied by the IMAQ GetPalette VI. This palette is composed of 256 elements for each of the three color planes (red, green, and blue). A specific color is the result of applying a value between 0 and 255 to each of the three color planes. If the three planes have identical values, a gray level is obtained (0 specifies black and 255 specifies white). If the image type requires a color palette and it is not supplied, a grayscale color palette is generated and written.

/images/reference/en-XX/help/370281AE-01/cu8.gif

Red is the value of the red color plane.

/images/reference/en-XX/help/370281AE-01/cu8.gif

Green is the value of the green color plane.

/images/reference/en-XX/help/370281AE-01/cu8.gif

Blue is the value of the blue color plane.

/images/reference/en-XX/help/370281AE-01/cgenclasstagrefflat.gif

Image is a reference to the image structure to write as an image file.

/images/reference/en-XX/help/370281AE-01/cpath.gif

File Path is the complete pathname, including drive, directory, and filename, of the file to read.

/images/reference/en-XX/help/370281AE-01/cu32.gif

Image Quality specifies the amount of compression applied to the image. Image Quality can range from 0 to 1000. The default value is 750. The higher the value, the less compression the VI applies.

/images/reference/en-XX/help/370281AE-01/cerrcodeclst.gif

error in (no error) describes the error status before this VI or function runs. The default is no error. If an error occurred before this VI or function runs, the VI or function passes the error in value to error out. This VI or function runs normally only if no error occurred before this VI or function runs. If an error occurs while this VI or function runs, it runs normally and sets its own error status in error out. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. Use error in and error out to check errors and to specify execution order by wiring error out from one node to error in of the next node.

/images/reference/en-XX/help/370281AE-01/cbool.gif

status is TRUE (X) if an error occurred before this VI or function ran or FALSE (checkmark) to indicate a warning or that no error occurred before this VI or function ran. The default is FALSE.

/images/reference/en-XX/help/370281AE-01/ci32.gif

code is the error or warning code. If status is TRUE, code is a nonzero error code. If status is FALSE, code is 0 or a warning code.

/images/reference/en-XX/help/370281AE-01/cstr.gif

source describes the origin of the error or warning and is, in most cases, the name of the VI or function that produced the error or warning. The default is an empty string.

/images/reference/en-XX/help/370281AE-01/cbool.gif

Use bit depth? (false) When saving a signed 16-bit image to a PNG file, NI Vision must convert the data to an unsigned format and shift the data so that most significant bit is always the leftmost bit. Set this parameter to TRUE to use the bit depth information attached to the image to perform these conversions. Set this parameter to FALSE to bias the image by adding a constant value to all the pixels in the image such that the lowest negative pixel value in the image maps to zero, and then shifting the image data based on the highest pixel value in the image. The default is FALSE.

/images/reference/en-XX/help/370281AE-01/igenclasstagrefflat.gif

Image Out (duplicate) is a reference to Image. This VI does not modify the image connected to the Image input.

/images/reference/en-XX/help/370281AE-01/ierrcodeclst.gif

error out contains error information. If error in indicates that an error occurred before this VI or function ran, error out contains the same error information. Otherwise, it describes the error status that this VI or function produces. Right-click the error out indicator on the front panel and select Explain Error from the shortcut menu for more information about the error.

/images/reference/en-XX/help/370281AE-01/ibool.gif

status is TRUE (X) if an error occurred or FALSE (checkmark) to indicate a warning or that no error occurred.

/images/reference/en-XX/help/370281AE-01/ii32.gif

code is the error or warning code. If status is TRUE, code is a nonzero error code. If status is FALSE, code is 0 or a warning code.

/images/reference/en-XX/help/370281AE-01/istr.gif

source describes the origin of the error or warning and is, in most cases, the name of the VI or function that produced the error or warning. The default is an empty string.

IMAQ Write Image And Vision Info File 2

Writes an image, along with extra vision information associated with the image, to a PNG file. This extra vision information includes overlay information, pattern matching template information, calibration information, and custom data.

Note  The extra vision information can be saved only with the PNG file format.

Supported Image Types

8-bit unsigned grayscale 16-bit unsigned grayscale 32-bit RGB 16-bit signed grayscale 64-bit RGB 32-bit HSL

IMAQ Write Image And Vision Info File 2

/images/reference/en-XX/help/370281AE-01/c1dnclst.gif

Color Palette is used to apply a color palette to an image. Color Palette is an array of clusters constructed by the user or supplied by the IMAQ GetPalette VI. This palette is composed of 256 elements for each of the three color planes (red, green, and blue). A specific color is the result of applying a value between 0 and 255 to each of the three color planes. If the three planes have identical values, a gray level is obtained (0 specifies black and 255 specifies white). If the image type requires a color palette and it is not supplied, a grayscale color palette is generated and written.

/images/reference/en-XX/help/370281AE-01/cu8.gif

Red is the value of the red color plane.

/images/reference/en-XX/help/370281AE-01/cu8.gif

Green is the value of the green color plane.

/images/reference/en-XX/help/370281AE-01/cu8.gif

Blue is the value of the blue color plane.

/images/reference/en-XX/help/370281AE-01/cgenclasstagrefflat.gif

Image is a reference to the image structure to write as an image file.

/images/reference/en-XX/help/370281AE-01/cpath.gif

File Path is the complete pathname, including drive, directory, and filename, of the file to read.

/images/reference/en-XX/help/370281AE-01/cerrcodeclst.gif

error in (no error) describes the error status before this VI or function runs. The default is no error. If an error occurred before this VI or function runs, the VI or function passes the error in value to error out. This VI or function runs normally only if no error occurred before this VI or function runs. If an error occurs while this VI or function runs, it runs normally and sets its own error status in error out. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. Use error in and error out to check errors and to specify execution order by wiring error out from one node to error in of the next node.

/images/reference/en-XX/help/370281AE-01/cbool.gif

status is TRUE (X) if an error occurred before this VI or function ran or FALSE (checkmark) to indicate a warning or that no error occurred before this VI or function ran. The default is FALSE.

/images/reference/en-XX/help/370281AE-01/ci32.gif

code is the error or warning code. If status is TRUE, code is a nonzero error code. If status is FALSE, code is 0 or a warning code.

/images/reference/en-XX/help/370281AE-01/cstr.gif

source describes the origin of the error or warning and is, in most cases, the name of the VI or function that produced the error or warning. The default is an empty string.

/images/reference/en-XX/help/370281AE-01/igenclasstagrefflat.gif

Image Out (duplicate) is a reference to Image. This VI does not modify the image connected to the Image input.

/images/reference/en-XX/help/370281AE-01/ierrcodeclst.gif

error out contains error information. If error in indicates that an error occurred before this VI or function ran, error out contains the same error information. Otherwise, it describes the error status that this VI or function produces. Right-click the error out indicator on the front panel and select Explain Error from the shortcut menu for more information about the error.

/images/reference/en-XX/help/370281AE-01/ibool.gif

status is TRUE (X) if an error occurred or FALSE (checkmark) to indicate a warning or that no error occurred.

/images/reference/en-XX/help/370281AE-01/ii32.gif

code is the error or warning code. If status is TRUE, code is a nonzero error code. If status is FALSE, code is 0 or a warning code.

/images/reference/en-XX/help/370281AE-01/istr.gif

source describes the origin of the error or warning and is, in most cases, the name of the VI or function that produced the error or warning. The default is an empty string.

IMAQ Write TIFF File 2

Writes an image to a file in TIFF format.

Note  16-bit monochrome images and 64-bit RGB images are nonstandard extensions of the TIFF standard. Most third-party applications cannot read 16-bit monochrome or 64-bit RGB TIFF files. For compatibility with most applications, write 16-bit monochrome images or 64-bit RGB images into PNG files.

Supported Image Types

8-bit unsigned grayscale 16-bit unsigned grayscale 32-bit RGB 16-bit signed grayscale 64-bit RGB

IMAQ Write TIFF File 2

/images/reference/en-XX/help/370281AE-01/c1dnclst.gif

Color Palette is used to apply a color palette to an image. Color Palette is an array of clusters constructed by the user or supplied by the IMAQ GetPalette VI. This palette is composed of 256 elements for each of the three color planes (red, green, and blue). A specific color is the result of applying a value between 0 and 255 to each of the three color planes. If the three planes have identical values, a gray level is obtained (0 specifies black and 255 specifies white). If the image type requires a color palette and it is not supplied, a grayscale color palette is generated and written.

/images/reference/en-XX/help/370281AE-01/cu8.gif

Red is the value of the red color plane.

/images/reference/en-XX/help/370281AE-01/cu8.gif

Green is the value of the green color plane.

/images/reference/en-XX/help/370281AE-01/cu8.gif

Blue is the value of the blue color plane.

/images/reference/en-XX/help/370281AE-01/cgenclasstagrefflat.gif

Image is a reference to the image structure to write as an image file.

/images/reference/en-XX/help/370281AE-01/cpath.gif

File Path is the complete pathname, including drive, directory, and filename, of the file to read.

/images/reference/en-XX/help/370281AE-01/cnclst.gif

TIFF Options is a cluster of optional values that you can use to set TIFF options. This cluster consists of the following elements:

/images/reference/en-XX/help/370281AE-01/ci32.gif

Rows Per Strip designates the number of rows you want to designate per strip of data. The default value of 0 specifies to write the entire data as one strip.

/images/reference/en-XX/help/370281AE-01/ci32.gif

Photometric designates whether to interpret white or black as a zero value.

WhiteIsZero (0)

Designates white as the zero value

BlackIsZero (1)

Designates black as the zero value

/images/reference/en-XX/help/370281AE-01/ci32.gif

Compression Type determines the compression type. By default, no compression is used. Choose from the following options:

Note  The JPEG compression type is not valid for 16-bit monochrome or 64-bit RGB images.
Note  If you select the JPEG compression type, the VI ignores the Color Palette.
None (0)

No compression is used on the image

JPEG (1)

JPEG compression is used on the image

Run Length Encoded (2)

Run Length Encoding is used on the image

Zip (3)

Zip compression is used on the image

/images/reference/en-XX/help/370281AE-01/cerrcodeclst.gif

error in (no error) describes the error status before this VI or function runs. The default is no error. If an error occurred before this VI or function runs, the VI or function passes the error in value to error out. This VI or function runs normally only if no error occurred before this VI or function runs. If an error occurs while this VI or function runs, it runs normally and sets its own error status in error out. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. Use error in and error out to check errors and to specify execution order by wiring error out from one node to error in of the next node.

/images/reference/en-XX/help/370281AE-01/cbool.gif

status is TRUE (X) if an error occurred before this VI or function ran or FALSE (checkmark) to indicate a warning or that no error occurred before this VI or function ran. The default is FALSE.

/images/reference/en-XX/help/370281AE-01/ci32.gif

code is the error or warning code. If status is TRUE, code is a nonzero error code. If status is FALSE, code is 0 or a warning code.

/images/reference/en-XX/help/370281AE-01/cstr.gif

source describes the origin of the error or warning and is, in most cases, the name of the VI or function that produced the error or warning. The default is an empty string.

/images/reference/en-XX/help/370281AE-01/igenclasstagrefflat.gif

Image Out (duplicate) is a reference to Image. This VI does not modify the image connected to the Image input.

/images/reference/en-XX/help/370281AE-01/ierrcodeclst.gif

error out contains error information. If error in indicates that an error occurred before this VI or function ran, error out contains the same error information. Otherwise, it describes the error status that this VI or function produces. Right-click the error out indicator on the front panel and select Explain Error from the shortcut menu for more information about the error.

/images/reference/en-XX/help/370281AE-01/ibool.gif

status is TRUE (X) if an error occurred or FALSE (checkmark) to indicate a warning or that no error occurred.

/images/reference/en-XX/help/370281AE-01/ii32.gif

code is the error or warning code. If status is TRUE, code is a nonzero error code. If status is FALSE, code is 0 or a warning code.

/images/reference/en-XX/help/370281AE-01/istr.gif

source describes the origin of the error or warning and is, in most cases, the name of the VI or function that produced the error or warning. The default is an empty string.

WAS THIS ARTICLE HELPFUL?

Not Helpful