Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!wuarchive!mit-eddie!bloom-beacon!eru!hagbard!sunic!mcsun!ukc!icdoc!syma!jonm From: jonm@syma.sussex.ac.uk (Jonathan Meyer) Newsgroups: comp.windows.x Subject: X11R5 Dreams Message-ID: <3355@syma.sussex.ac.uk> Date: 29 Aug 90 12:39:25 GMT Organization: University of Sussex Lines: 41 I'm sure that many people would agree with me if I said that one of the most unpleasant part of X is handling color images. I'd love someone to rationalise the situation for constructing new colors. Whoever named the following two procedures must have been a little tired: XAllocColor - allocate single READ ONLY color cell XAllocColorCells - allocate multiple READ WRITE color cells What happened to multiple read-only color cells, or a single read write color cell? It seems our memory is once again left to do the work, rather than an explicit naming system. I would love something like: XAllocReadWriteColor XAllocReadWriteColors and XAllocReadOnlyColor XAllocReadOnlyColors Which take a color or array of colors and allocate them corrospondingly, returning 1 on success. Another thing I miss is the ability to determine whether a pixel value is a valid allocated color, an unallocated color, and whether it is read-write or read-only for a specific display connection. It would also be very useful to see if an RGB value is named in the color database for a display, so that I can take a pixel value and determine what named color it corrosponds to. Maybe XQueryColor could be extended to do something like this. Next, I would love a hook on XImage structures for XGetImage/XPutImage so that I could perform normalization on the pixel values on the fly as they go up/down the socket. This way, I can write a conversion procedure that maps between image data and colormap pixel values (and visa-versa) which work invisibly. Specifying normalization procedures of NULL would result in optimized performance using no normalization. This system would be much more useful than writing coercion procedures that I call before an XPutImage and after an XGetImage. Since just about every image goes through this conversion procedure, I think that all of us would benifit from such a feature. Of course, a standard image format would help (and XPM is a start), but can people remember that some of us are performing image processing; 1/2 or 1 MB grayscale images are commonplace - an ASCII format such as XPM would be unsuitable for such images. Personally, I'm happy with sun rasterfiles, and support converting between pixmaps and rasterfiles would be wonderful! Now, I could go on to talk about the Xt (especially things like resource conversion dependancy trees), but then again... Jon