HDFPUT24 Function
Puts an HDF Raster 24 image into an HDF file.
 
Restriction
See "Supported Platforms Guide" on the PV-WAVE Documentation website to check if this function is available on your operating system.
Usage
status = HDFPUT24 (filename, image)
Input Parameters
filename—A string containing the name of the HDF file.
image—A byte array containing the 24 bit image to write to the file.
Return Value
status—The status of the function call, where:
*SUCCEED (0)—Indicates success.
*FAIL (–1)—Indicates failure.
Keywords
Append—If nonzero, append the image to the end of the HDF file. Otherwise, the HDF file is rewritten to contain only the image provided. The default is 0, do not append the image to the file, overwrite file contents.
Help—If present and nonzero, lists the usage for this routine.
Interlace—Set the HDF interlace scheme to use in writing the image. Possible values include:
*DFIL_PIXEL
*DFIL_LINE
*DFIL_PLANE
The default interlace scheme used will be DFIL_PIXEL.
 
note
The interlace should match the dimensions of the image provided. Refer to “Writing 24-Bit Raster Images to a File” in the NCSA HDF Calling Interfaces and Utilities manual for details.
Usage—If present and nonzero, lists the usage for this routine. (Same as the Help keyword.)
Discussion
HDFPUT24 writes 24 bit images to an HDF file. The Append keyword lets you write additional 24 bit images the same file.
Example
hdf_init
@hdf_common
testfile = 'hdfput24_ex1_output.hdf'
img = IMAGE_READ(!Data_dir + '/mandril24.jpg')
image_0 = img('pixels')
image_1 = image_0 + 70B
status = HDFPUT24 (testfile, image_0, $
   Interlace=DFIL_PLANE)
IF (status EQ FAIL) THEN  $
   MESSAGE, 'Failed to write image_0.'
status = HDFPUT24 (testfile, image_1, $
   Interlace=DFIL_PLANE, /Append)
IF (status EQ FAIL) THEN  $
   MESSAGE, 'Failed to write image_1.'
See Also
Also refer to the following routines in the HDF Reference Manual:
DF24ADDIMAGE, DF24PUTIMAGE, DF24SETIL
For more information on using the HDF interface and the calling sequence for the entire suite of HDF base functions, refer to Appendix A: PV-WAVE HDF Interface.
For a complete list of the HDF convenience routines, refer to Chapter 1: Functional Summary of Routines.