mangin@debussy.inria.fr (Frank Mangin) (10/29/90)
-- I have been writing an image viewing utility under X, using Motif, and I have some remarks: - As far as I know, the Intrinsics don't provide any way to create a shell widget with a visual different from the root window's visual. Just try to view RGB images on a pseudo color visual, you will understand... - Most often, you can't use the default colormap for image viewing. It would be really great to have more than one colormap active at a time (I mean pixels with the same value simultaneously displayed with different colors depending on the window they belong to). - I just compiled the sun 24 bits server recently posted on comp.sources.x. It runs fine, anyway there is a problem with decomposed static colormaps: suppose you want to map an image, you know the rgb values, and you need the corresponding pixel values. The standard way to do this is XAllocColor, that allocates nothing, but looks up the pixel value in the colormap. But this is one server request per pixel! On a sun sparc station, it takes 1 mn for 1000 pixels... I've had to "count in bits" to guess pixel values from the rgb masks (see mit/server/dix/colormap.c for details), and this works only because low pixel values give dark colors for that server. Why not an XLookupColorsss, that would query several values in a single request? Frank Mangin Inria Phone #93 65 78 66 2004 route des Lucioles Email: mangin@mirsa.inria.fr 06560 Valbonne Cedex France
etaylor@wilkins.iaims.bcm.tmc.edu (Eric Taylor) (10/30/90)
In article <8913@mirsa.inria.fr>, mangin@debussy.inria.fr (Frank Mangin) writes: |> -- |> |> I have been writing an image viewing utility under X, using Motif, and I have some remarks: |> |> - As far as I know, the Intrinsics don't provide any way to create a shell widget with a visual different from the root window's visual. Just try to view RGB images on a pseudo color visual, you will understand... What about XtNvisual? It works but most X's I have dealt with do not support multiple visuals on the same screen. |> |> - Most often, you can't use the default colormap for image viewing. It would be really great to have more than one colormap active at a time (I mean pixels with the same value simultaneously displayed with different colors depending on the window they b|> elong to). I made an image viewer that reuses pixels for multiple invocations. It uses color dithering for VERY nice displays using the default colormap (of course any other viewer will mess it all up). |> |> - I just compiled the sun 24 bits server recently posted on comp.sources.x. It runs fine, anyway there is a problem with decomposed static colormaps: suppose you want to map an image, you know the rgb values, and you need the corresponding pixel values.|> The standard way to do this is XAllocColor, that allocates nothing, but looks up the pixel value in the colormap. But this is one server request per pixel! On a sun sparc station, it takes 1 mn for 1000 pixels... I've had to "count in bits" to guess |> |> |> |> |> |> |> values from the rgb masks (see mit/server/dix/colormap.c for details), and this works only because low pixel values give dark colors for that server. Why not an XLookupColorsss, that would query several values in a single request? Do not use XAllocColor when you do not have to. Use the red_mask, green_mask, and blue_mask of the visual structure. This is only SLIGHTLY bad but works very well. |> |> Frank Mangin |> Inria Phone #93 65 78 66 |> 2004 route des Lucioles Email: mangin@mirsa.inria.fr |> 06560 Valbonne Cedex |> France -- Eric Taylor Baylor College of Medicine etaylor@wilkins.bmc.tmc.edu (713) 798-3776
klee@wsl.dec.com (Ken Lee) (10/31/90)
In article <8913@mirsa.inria.fr>, mangin@debussy.inria.fr (Frank Mangin) writes: |> - As far as I know, the Intrinsics don't provide any way to create a shell |> widget with a visual different from the root window's visual. Just try to |> view RGB images on a pseudo color visual, you will understand... The X11R4 shell widget has a visual resource. |> - Most often, you can't use the default colormap for image |> viewing. It would be really great to have more than one colormap active |> a time (I mean pixels with the same value simultaneously displayed |> with different colors depending on the window they belong to). Does your hardware support this? Sure, you could simulate it in software, but performance would be terrible. -- Ken Lee DEC Western Software Laboratory, Palo Alto, Calif. Internet: klee@wsl.dec.com uucp: uunet!decwrl!klee