HDefObj (see figure 5.19) reassigns the component comp (0 … n) of an image object given by its database key comp_key. A typical application of this routine is shown in figure 5.21: Image data is stored in a database object using HPutImage. Furthermore, a new image object is created by HCrObj. This new object does not contain any gray value channels, see section “HCrObj”. Using HDefObj, the previously stored image data is assigned as default gray value component 1 (IMAGE_INDEX) of the new image object.
Note that HDefObj automatically checks the result state of the underlying procedure with the macro HCkP (see section “HCkP”). Thus, you must not use HCkP on HDefObj yourself.