Help needed: Create pixmap with 8 bit color depth under X Server don't support 8 bit color depth pixmap!



To whom it may concern,
 
Recently I am trying to write a small program which will have the following features:
Create pixmap (8 bits color depth) and drawstring on top of it and output the result pixmap as rgb buffer. every 33ms.
 
The problem I was facing now is how to create pixmap with 8 color depth without direct changing the X configuration. As I try to create new pixmap using gdk_pixmap_new(widger->window, PIXMAP_WIDTH, PIXMAP_HEIGHT, 8) but it return error while I complie the program. And I also try to use "gtk_widget_push_visual" but it also fail. So I type "xdpyinfo" and figure out that the X Server only support pixmap with depth 1 and pixmap with my display resolution (i.e. 16 bit/24 bit). So I would like to know if my x configuration for the x server don't support 8 bit pixmap, is there any method I can try to create pixmap with 8bit color depth. If not, how to configure to enable more capabality of pixmap for the X server???
 
Also I know there is a function gdk_pixbuf_get_from_drawable which can let me to output the result as pixbuf. But to use this function do I have to upgrade to GTK1.3?? if so, please kindly advice the procedure. As I downloaded those 6 rpm file from the download section of www.gtk.org and use rpm -U. And I follow the method to complie the program. (i.e. using pkg-config) but it return an error message which mention "pkg-config not found". Therefore I wish someone can give me any solution ASAP.
 
Many thanks!!!
Best regards,
Kalvin
 
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]