Re: Retrieving RGB from pixel values.

Ian King <king eiffel com> writes:
> With gtk+ 1.2, if my visual is a GDK_TRUE_COLOR_VISUAL, what is the easiest 
> way to retrieve rgb values from a certain pixel value.


 image = gdk_image_get(drawable, x, y, 1, 1);
 pixel = gdk_image_get_pixel (image, 0, 0);
 gdk_colormap_query_color (colormap, pixel, &color);

Colormap must actually be the colormap for drawable.


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