williams@casbah.acns.nwu.edu (Gus Williams) (03/21/91)
Is X11R4 able to display color bitmaps in the xsetroot commmand? or any other way to display color bitmaps in the background? If so what format should the pictures be in and how do I display them? Thanks in advance. GUS WILLIAMS williams@casbah.acns.nwu.edu (708) 491-3838 williams@voltaire.cme.nwu.edu (708) 972-4609 williams@adelaide.ees.anl.gov Escape from the real world, get a PhD -- GUS WILLIAMS williams@casbah.acns.nwu.edu (708) 491-3838 williams@voltaire.cme.nwu.edu (708) 972-4609 williams@adelaide.ees.anl.gov Escape from the real world, get a PhD
keinert@IASTATE.EDU (Keinert Fritz) (03/21/91)
> 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. Also, the window managers I have tried (mwm and twm) do not recycle colors. If you have a background with 150 colors, and you try to replace it with one with 120 colors, this will not work. Basically, you get one fancy color picture per login. Fritz Keinert keinert@vincent.iastate.edu Dept. of Mathematics keinert@pollux.math.iastate.edu Iowa State University s1fxk@ccvax.iastate.edu Ames, IA 50011 s1.fxk@isumvs.bitnet Tel: (515) 294-5128
ekberg@asl.dl.nec.COM (Tom Ekberg) (03/21/91)
> > 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)
brown@ftms.UUCP (Vidiot) (03/21/91)
In article <1991Mar20.163036.28305@casbah.acns.nwu.edu> williams@casbah.acns.nwu.edu (Gus Williams) writes:
<Is X11R4 able to display color bitmaps in the xsetroot commmand?
<or any other way to display color bitmaps in the background?
<
<If so what format should the pictures be in and how do I display them?
I've recently been through a minor problem with this and things are working
A-OK now.
With xsetroot you use xbm files. These can be created many ways, one of which
is to use bitmap. When putting up the filee to the root display, do:
xsetroot -bitmap filename.xbm -fg #color_number -bg #color_number
The fg (foreground) and bg (background) colors can be the hex (#nnnnnn) for
named (blue) types. If putting this line in a startup shell and using the
hex syntax, place a \ in front of the # to escape the comment meaning within
the shell.
To put up color pictures, there are two user contibuted programs around, xv
and xloadimage. Both can display many types of files, one of which being the
popular GIF format. The xloadimage program allows the MinimalDecor operation,
so that a file can be displayed without the title bar. Go find them, you will
be impressed.
BTW, the root cursor can also be changed to what you want. It too is an xbm
file and created with bitmap. That is called doing:
xsetroot -cursor filename.xbm filename_mask.xbm
Disclaimer: The above information pertains to OpenWindows 2.0, so your
mileage may vary.
--
harvard\
ucbvax!uwvax!astroatc!ftms!brown
rutgers/
INTERNET: spool.cs.wisc.edu!astroatc!ftms!brown
rthomson@mesa.dsd.es.com (Rich Thomson) (03/22/91)
In article <1991Mar20.163036.28305@casbah.acns.nwu.edu> williams@casbah.acns.nwu.edu (Gus Williams) writes: >Is X11R4 able to display color bitmaps in the xsetroot commmand? No. Currently there is no consortium blessed format for color images (pixmaps really; bitmaps are 1-bit deep pixmaps). There is a group working on a format called "XPM" and a library for working with pixmap files. They have a mailing list (whose name escapes me for the moment). >or any other way to display color bitmaps in the background? xv will display color images into your root window. The version I saw knew about X11 bitmaps, Compu$erve GIF, and PBM files. It is available by anonymous FTP on export.lcs.mit.edu. -- Rich -- ``Read my MIPS -- no new VAXes!!'' -- George Bush after sniffing freon Disclaimer: I speak for myself, except as noted. UUCP: ...!uunet!dsd.es.com!rthomson Rich Thomson ARPA: rthomson@dsd.es.com PEXt Programmer
roger@hpnmdla.hp.com (Roger Petersen) (03/24/91)
In comp.windows.x, keinert@IASTATE.EDU (Keinert Fritz) writes: | > Is X11R4 able to display color bitmaps in the xsetroot commmand? | > or any other way to display color bitmaps in the background? | Also, the window managers I have tried (mwm and twm) do not recycle colors. | If you have a background with 150 colors, and you try to replace it with | one with 120 colors, this will not work. Basically, you get one fancy color | picture per login. This was a problem with a very old version of xloadimage (1.03 or so). Since then, I'm sure it has been fixed. A properly written X program will set a property on the root window, to allow other programs to free the allocated color cells, and re-use them. Roger
slt@unislc.uucp (Stuart Timm) (03/29/91)
From article <1991Mar20.163036.28305@casbah.acns.nwu.edu>, by williams@casbah.acns.nwu.edu (Gus Williams): > Is X11R4 able to display color bitmaps in the xsetroot commmand? > or any other way to display color bitmaps in the background? > > If so what format should the pictures be in and how do I display them? > > Thanks in advance. > ================================================================= Yes, with the X11R4 xsetroot program you can use the -xpm or -pixmap option to specify a pixmap file in XPM format. It works great!! Stuart L. Timm Unisys Corporation Salt Lake City, Utah uunet!uplherc!unislc!slt