If it does not find a matching pixmap in the cache, it searches the image cache for an image matching the specified name. If it finds a matching image, it creates and caches a pixmap of the specified depth on the specified screen, transfers the image to the pixmap, and returns the pixmap. If it does not find a matching image in the cache, it uses XtResolvePathname to search for a file of the specified name. If it finds such a file, it assumes that the file is in X bitmap format, reads the file, and creates and caches an image in XYBitmap format. It then creates and caches a pixmap of the specified depth on the specified screen, transfers the image to the pixmap, and returns the pixmap.
Motif preinstalls a number of images in the image cache.
The image can be of any depth. The application can then call XmInstallImage to install the image in the image cache by name. The application or user can create a file in X bitmap format and install the file under an appropriate name in a directory that is in the search path used by XmGetPixmapByDepth. Both of these mechanisms have advantages and disadvantages. An application using XmInstallImage can create an image of any depth.