Writesimage data to a file using the Tag Image File Format (TIFF) format.
NOTE: This function was retired with version 6.1, since the new IMAGE_WRITE function provides the same capability. Although DC_READ_TIFF is still available for backward compatibility, we strongly recommend that you use IMAGE_WRITE instead.
imgarr The 2 or 3-D byte array from which the image data is transferred. Note that variables of type structure are not supported.
'Bilevel'
'Grayscale'
'Palette Color'
'RGB Full Color'
The four classes of TIFF image conformance are explained in more detail in the PV-WAVE Programmer's Guide.
Compress A string that signifies the kind of image data compression to use as the data is written to the file (if TIFF class 'B' (Bilevel) is specified). If not provided, no compression is performed. Valid values at this time are:
'None'
'PackBits'
Bilevel
. The default threshold is 128. Order If nonzero, returns the image mirrored in the y-direction. (Default: Do not mirror the image.)
Palette The color table to store with the image data if TIFF class P (Palette Color) is specified. Palette must be a 3-by-256 array of integers.
Threshold An integer specifying the threshold value for dithering a grayscale image to a binary image. When the Class keyword is set to
Bilevel
, the image is converted to a binary image before being stored to disk. Pixels in the image that are greater than the threshold level are set to 255. All other pixels are set to 0. This keyword is only valid when the Class keyword is set to Bilevel
. If Bilevel
is specified and no threshold is given, the threshold value defaults to 128.
If imgarr is not a 2 or 3-D byte array, DC_WRITE_TIFF returns an error status and no data is written to the output file.
If TIFF class 'P' (Palette Color) is specified, you must use the Palette keyword to specify a palette array.
If TIFF class 'RGB' (RGB Full Color) is specified, imgarr must be a 3-D byte array with the last dimension equal to 3. In other words, imgarr must be an image-interleaved image; pixel-interleaved images cannot be stored in a TIFF file when using the DC_WRITE_TIFF function. The difference between pixel-interleaved and image-interleaved data is discussed in the PV-WAVE Programmer's Guide.
maverick
is a 512-by-512 byte array, the function call:
status = DC_WRITE_TIFF('mav.tif', maverick, $ Class='Bi', Compress='Pack')
mav.tif
and uses it to store the image data contained in the variable maverick
. The created TIFF file is compressed and conforms to the TIFF 'Bilevel' classification.
true
is a 400-by-400-by-3 true-color 24-bit image (byte array), the function call:
status = DC_WRITE_TIFF('true_c.tif', true, $ Class='RGB')
true_c.tif
and uses it to store the RGB color image data contained in the variable true
; image interleaving is used because the variable is 400-by-400-by-3. The created TIFF file conforms to the TIFF RGB Full Color classification.
See the PV-WAVE Programmer's Guide for more information about TIFF image I/O.