Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!uwm.edu!spool.mu.edu!snorkelwacker.mit.edu!bloom-beacon!dont-send-mail-to-path-lines From: ekberg@asl.dl.nec.COM (Tom Ekberg) Newsgroups: comp.windows.x Subject: Re: Color background for X-windows Message-ID: <9103211448.AA08009@aslss01.asl.dl.nec.com> Date: 21 Mar 91 14:48:38 GMT Sender: daemon@athena.mit.edu (Mr Background) Organization: The Internet Lines: 33 > > Is X11R4 able to display color bitmaps in the xsetroot commmand? > > or any other way to display color bitmaps in the background? > > The xsetroot command can only handle bitmaps (2 colors), but it is > possible to have color backgrounds. I use > xloadimage -onroot picturefile > where picturefile can be in various formats (gif, sun raster file, ...) > > Note, however, that there is a root color map with 256 entries, and that has > to be enough for the background and all colors used in windows that > don't have their own color maps. I would not use pictures with more than > 200 colors, to leave some for other things. In the past I have used xgifroot to put color GIF images into the root window. It is especially nice when you hook it up with crontab to cycle through a collection of nice images. While I don't know about xloadimage -onroot, I do know that xgifroot allocates the colors it needs, loads the image and then frees up the colors for others to use. Freeing up the color cells does not affect the RGB values in the colormap; they are left alone until they are changed for another application. This way one can display an image which needs over 200 colors and still have those color cells available for other applications to use. When an application needs a color, it will most likely start using the ones which were already set up by xgifroot, which most likely will cause colors in the root image to change giving a false color look. This approach works well when the color cells needed are allocated before calling xgifroot. I have only tried this on a Sun4 workstation using the X11R4 MIT sample server, so I really don't know if it works like this on other servers. -- tom, ekberg@asl.dl.nec.com (x3503)