Re: [gtk-list] gdk_image_get_pixel



>   How does gdk_image_get_pixel works? It returns a guint32, but
>  a GdkColor would be much more useful. How to use this guint32 to
>  get the real color?

gdk_image_get_pixel() returns an X pixel value.  If you want its RGB
components, you have to do XQueryColor() on the same colormap that
your image was created with.  Gdk does not provide a wrapper for it,
though.

Read an Xlib manual for all the gritty details.

  Federico



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