Creates an associative array in image format.
The input array must be in one of the following forms, where w is the image width, h is the height, and img_count, an optional parameter, is the number of images in the array:
NOTE: If the input pixel_array is 2D and the Colormap keyword is not specified, the returned image is assumed to be grayscale.
Depth A long integer specifying the number of bits per channel. (Default: 8)
File_Name A string containing a default filename for the image.
File_Type A string specifying the type of image file to create. For example,
'sun'
denotes a Sun Rasterfile. (Default: TIFF)
NOTE: See the Discussion section of the IMAGE_READ function for a list of valid file types.
Intleave A scalar string indicating the desired type of interleaving of 3D image arrays. (Default:
image
) Valid strings and the corresponding interleaving methods are:
'image'
The resulting 3D image array arrangement is (x, y, p) for p image-interleaved images of x-by-y. (Default)
'row'
The resulting 3D image array arrangement is (x, p, y) for p row-interleaved images of x-by-y.
'pixel'
The resulting 3D image array arrangement is (p, x, y) for p pixel-interleaved images of x-by-y.
Units Units of pixel size. (1 = inches; 2 = millimeters)
X_resolution Pixel size in Units.
Y_resolution Pixel size in Units.
NOTE: When creating an image that contains 3D pixel data, you must specify the interleaving method if either the width or height has a value of 3. For example, if the dimensions of your data are 100 x 3 x 3 and the data is plane interleaved, it will be interpreted as line interleaved unless you explicitly set the Interleave keyword to the correct value.
pixels = BYTARR(100, 200)
cmap = BYTARR(3, 50)
image = IMAGE_CREATE(pixels, File_name='test.tif', $ Colormap = cmap, File_type = 'tif'); Create the image -- an associative array of image-related ; data. Next, use INFO to display the contents of the array.
INFO, image, /Full