The HDF_DF24_ADDIMAGE procedure writes a 24-bit raster image to a Hierarchical Data Format file. The interlace is set automatically based upon the dimensions of the image being written: ARR(3, Width, Height) for pixel interlace, ARR(Width, 3, Height) for scan-line interlace, and ARR(Width, Height, 3) for scan-plane interlace.

Calling Sequence

HDF_DF24_ADDIMAGE, Filename, Image



A scalar string containing the name of the file to be written.


A 3-dimensional array of values representing the 3 planes (Red, Green, and Blue) of the 24-bit image. One of the dimensions must be 3 (e.g., a 3 x 100 x 100 array).



Set this keyword to force the JPEG quantization tables to be constrained to the range 1...255. This provides full baseline compatibility with external JPEG applications, but only makes a difference if the QUALITY keyword is set to a value less than 25. The default is TRUE.


Set this keyword to compress the image being added using the JPEG (Joint Photographic Expert Group) method. Note that JPEG compression is lossy ; see WRITE_JPEG in the IDL Reference Guide for more information about when this method is appropriate. (In other words, using JPEG compression to reduce the size of an images changes the values of the pixels and hence may alter the meaning of the corresponding data.) Setting either the QUALITY or the FORCE_BASELINE keywords implies this method.


Set this keyword equal to the JPEG "quality" desired. This value should be in range 0 (terrible image quality but excellent compression) to 100 (excellent image quality but minimum compression). The default is 75. Setting this keyword implies that the JPEG keyword is set. Lower values of QUALITY produce higher compression ratios and smaller files.


Set this keyword to store the image using run length compression. RLE compression is lossless, and is recommended for images where data retention is critical.

See Also

WRITE_JPEG in the IDL Reference Guide .