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.
|
| 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. If fname is an absolute path, LabVIEW searches for the file on the local machine or target at the specified location. (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/373123B-01/imagetest.bmp', 'BMP');
z1 = fread_image('/images/reference/en-XX/help/373123B-01/imagetest.bmp', 'BMP');
surface(z1)