Company Events Academic Community Support Solutions Products & Services Contact NI MyNI

fread_image (MathScript RT Module Function)

LabVIEW 2012 MathScript RT Module Help

Edition Date: June 2012

Part Number: 373123C-01

»View Product Info
Download Help (Windows Only)

Owning Class: support

Requires: MathScript RT Module


a = fread_image(fname, ftype)

Legacy Name: imread


Reads image data from a file. The image size cannot exceed 4 megapixels.




Name Description
fname Specifies the filename. fname is a string.
ftype Specifies the file type. ftype is a string that accepts the following values.

'BMP' BMP image
'JPEG' JPEG image
'PNG' PNG image


Name Description
a Returns the data LabVIEW reads from the file you specify in fname. a is a matrix of 64-bit, double-precision, floating-point numbers.


If you use this function in a stand-alone application or shared library and fname is a relative path, LabVIEW searches for the file in the path where you installed the application or shared library. (Real-Time Module) If you deploy this function to an RT target and fname is a relative path, LabVIEW searches for the file in the path returned by the Default Data Directory VI.

The following table lists the support characteristics of this function.

Supported in the LabVIEW Run-Time Engine Yes
Supported on RT targets Yes
Suitable for bounded execution times on RT No (affects entire script)


z = peakfcn2d(30);
fwrite_image(z, '/images/reference/en-XX/help/373123C-01/imagetest.bmp', 'BMP');
z1 = fread_image('/images/reference/en-XX/help/373123C-01/imagetest.bmp', 'BMP');

Related Topics



Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit